Skip to content

Commit

Permalink
better env markers (#136)
Browse files Browse the repository at this point in the history
* better env markers

* typo fixed
  • Loading branch information
grzanka authored Aug 18, 2017
1 parent 5f9c8d1 commit 7db9a3b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
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
13 changes: 9 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 7db9a3b

Please sign in to comment.