Fixed setup to install dependencies using MANIFEST.in

* moved version number to _metadata.py
This commit is contained in:
Rob McMullen 2017-05-02 19:43:21 -07:00
parent 359e690b1c
commit ad1eca7b17
4 changed files with 38 additions and 32 deletions

View File

@ -1,3 +1,9 @@
include LICENSE include LICENSE
include README.rst include README.rst
recursive-include scripts * recursive-include scripts *
include atrcopy/templates/*
include test_data/dos*atr
include test_data/sd*atr
include test_data/*.xex
include test_data/rebuild.sh
include test_data/create_binary.py

View File

@ -1,11 +1,11 @@
__version__ = "4.0.0"
import os import os
import sys import sys
import logging import logging
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
from _metadata import __version__
try: try:
import numpy as np import numpy as np
except ImportError: except ImportError:

5
atrcopy/_metadata.py Normal file
View File

@ -0,0 +1,5 @@
__version__ = "4.0"
__author__ = "Rob McMullen"
__author_email__ = "feedback@playermissile.com"
__url__ = "https://github.com/robmcmullen/atrcopy"
__bug_report_url__ = "https://github.com/robmcmullen/atrcopy/issues"

View File

@ -1,5 +1,3 @@
from __future__ import with_statement
import sys import sys
try: try:
@ -7,20 +5,7 @@ try:
except ImportError: except ImportError:
from distutils.core import setup from distutils.core import setup
try: execfile('atrcopy/_metadata.py')
import atrcopy
version = atrcopy.__version__
except RuntimeError, e:
# If numpy isn't present, pull the version number from the error string
version = str(e).split()[1]
classifiers = [
"Programming Language :: Python :: 2",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
]
with open("README.rst", "r") as fp: with open("README.rst", "r") as fp:
long_description = fp.read() long_description = fp.read()
@ -31,17 +16,27 @@ else:
scripts = ["scripts/atrcopy"] scripts = ["scripts/atrcopy"]
setup(name="atrcopy", setup(name="atrcopy",
version=version, version=__version__,
author="Rob McMullen", author=__author__,
author_email="feedback@playermissile.com>", author_email=__author_email__,
url="https://github.com/robmcmullen/atrcopy", url=__url__,
packages=["atrcopy"], packages=["atrcopy"],
include_package_data=True,
scripts=scripts, scripts=scripts,
description="Disk image utilities for Atari 8-bit emulators", description="Utility to manage file systems on Atari 8-bit (DOS 2, DOS 3) and Apple ][ (DOS 3.3) disk images.",
long_description=long_description, long_description=long_description,
license="GPL", license="GPL",
classifiers=classifiers, classifiers=[
"Programming Language :: Python :: 2",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
],
install_requires = [ install_requires = [
'numpy', 'numpy',
], ],
tests_require = [
'pytest',
],
) )