-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] Make pip install numpy and scipy for us #10398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MRG] Make pip install numpy and scipy for us #10398
Conversation
Remove unnecessary blank line (flake8)
Suppress flake8 error on an import that we do just to see if the library is present
See #7867 (comment) |
The last build looked good except the Python 2.7 tests hung and were killed. I'm pretty sure this was unrelated to my changes, so I pushed an empty commit to trigger a new build. |
Please follow @njsmith recommendation. He is an expert on this packaging issues and he thinks that's the best practice, then that is how we should do it. Can you commit something following his approach and if that does not work as you seemed to say in the related issue, we'll try to figure out why. |
I created a separate PR so we can evaluate the other approach: This gives us the flexibility to choose which one to merge and which one to close. |
# for this platform, so it is safe to add numpy to build requirements. | ||
build_requires += ( | ||
['numpy>={0}'.format(NUMPY_MIN_VERSION)] | ||
if 'bdist_wheel' in sys.argv[1:] else []) |
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 this would be clearer as an if statement rather than appending an empty list.
Also, in the case where we add [], should we be checking that the numpy version meets minimum requirements?
|
||
if build_requires: | ||
metadata.update( | ||
setup_requires=build_requires, |
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 @njsmith was saying we should not use this...?
This PR modifies
setup.py
to includenumpy
andscipy
as setup dependencies. Thus, runningpip install scikit-learn
will automatically install these libraries if needed. This code was adapted fromscipy
.Fix #7867.