-
Notifications
You must be signed in to change notification settings - Fork 217
Make required numpy version for setup and install explicit. #3163
Conversation
python/requirements.txt
Outdated
@@ -1,4 +1,4 @@ | |||
six | |||
numpy==1.15.4; python_version == "3.4" | |||
numpy; python_version != "3.4" | |||
numpy==1.16.4; python_version != "3.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should we hard-code only for Python 2.7 and 3.4.
Let the user use latest version (or version required by other packages) in other cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
python/setup.py
Outdated
@@ -363,6 +363,22 @@ def build_extensions(self): | |||
build_ext.build_extensions(self) | |||
|
|||
|
|||
setup_requires = [ | |||
'numpy==1.15.4; python_version == "3.4"', | |||
'numpy==1.16.4; python_version != "3.4"', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid replicating this code by parsing the requirements.txt
file?
This should work:
setup_requires = open('requirements.txt').read().splitlines()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@aslepko @postrational I have made all the requested changes. Should we merge this PR or #3164 to master? #3162 which is identical to #3164 was merged to r0.23 |
Trying to generalize #3162 and avoid building numpy from source
numpy 1.15 is the last binary wheel to support python 3.4
numpy 1.16 seems like the last binary wheel to support python 2.7
Also trying to avoid the issue mentioned here
pytest-dev/pytest-xdist#136
This PR assumes nGraph supports python 2.7, 3.4, 3.5, 3.6, 3.7