diff --git a/setup.py b/setup.py index 236c405c6a6567446d1b5117dd5499dd8928fa96..e49c2b59415146775f876c2f0af06da127d5b17f 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ from __future__ import print_function from setuptools import setup, Command import os +import sys import lsmtool._version @@ -24,6 +25,11 @@ class PyTest(Command): errno = subprocess.call([sys.executable, 'runtests.py']) raise SystemExit(errno) +# Handle Python 3-only dependencies +if sys.version_info < (3, 0): + reqlist = ['numpy','astropy >= 0.4, <3.0'] +else: + reqlist = ['numpy','astropy >= 0.4'] setup( name='lsmtool', @@ -34,7 +40,7 @@ setup( description=description, long_description=long_description, platforms='any', - classifiers = [ + classifiers=[ 'Programming Language :: Python', 'Development Status :: 4 - Beta', 'Natural Language :: English', @@ -43,9 +49,9 @@ setup( 'Topic :: Scientific/Engineering :: Astronomy', 'Topic :: Software Development :: Libraries :: Python Modules', ], - install_requires=['numpy','astropy >= 0.4'], - scripts = ['bin/lsmtool'], + install_requires=reqlist, + scripts=['bin/lsmtool'], packages=['lsmtool','lsmtool.operations'], - setup_requires = ['pytest-runner'], - tests_require = ['pytest'] + setup_requires=['pytest-runner'], + tests_require=['pytest'] )