diff --git a/.travis.yml b/.travis.yml index 0dfd877..3dbf26b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ matrix: env: TOXENV=pep8 - python: 3.4 env: TOXENV=pep8 - - python: 3.4 + - python: 3.5 env: TOXENV=packaging # uncomment and adjust if you want to allow some failures allow_failures: diff --git a/requirements.txt b/requirements.txt index 321875f..eac66b8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -numpy<1.12 ; python_version >= '3.2' and python_version < '3.4' # numpy starting from 1.12 doesn't support python 3.2 and 3.3 -numpy ; python_version < '3.0' or python_version >= '3.4' # newest numpy for python 2.7, 3.4 and higher \ No newline at end of file +numpy<1.12,>=1.8 ; python_version >= '3.2' and python_version < '3.4' # numpy starting from 1.12 doesn't support python 3.2 and 3.3 +numpy>=1.8 ; python_version < '3.0' or python_version >= '3.4' # newest numpy for python 2.7, 3.4 and higher \ No newline at end of file diff --git a/setup.py b/setup.py index e86a6d0..6a42501 100644 --- a/setup.py +++ b/setup.py @@ -117,9 +117,14 @@ def get_cmdclass(): pytest_runner = ['pytest-runner'] if needs_pytest else [] # set specific numpy version for python 3.2 and 3.3 -numpy_version = 'numpy' -if sys.version_info.major == 3 and sys.version_info.minor in (2, 3): - numpy_version = 'numpy<1.12' +numpy_version = [ + "numpy<1.12,>=1.8;python_version >= '3.2' and python_version < '3.4'", + "numpy>=1.8;python_version < '3.0' or python_version >= '3.4'" +] + +# python 3.2 doesn't understand environment markers +if sys.version_info.major == 3 and sys.version_info.minor == 2: + numpy_version = ['numpy<1.12'] setuptools.setup( name='beprof', @@ -164,7 +169,7 @@ def get_cmdclass(): 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], - install_requires=[numpy_version], + install_requires=numpy_version, setup_requires=[] + pytest_runner, tests_require=['pytest'], cmdclass=get_cmdclass()