Skip to content

Commit

Permalink
MAINT: always specify install_requires in setup.py
Browse files Browse the repository at this point in the history
The --upgrade behavior of pip was changed
(pypa/pip#4500), so we can always specify the
numpy dependency correctly.

Don't use setup_requires any more --- that's superseded by
pyproject.toml (and probably never worked properly).
  • Loading branch information
pv committed Sep 27, 2018
1 parent 57f6200 commit 1ee1288
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,21 +414,6 @@ def setup_package():
if HAVE_SPHINX:
cmdclass['build_sphinx'] = ScipyBuildDoc

# Figure out whether to add ``*_requires = ['numpy']``.
# We don't want to do that unconditionally, because we risk updating
# an installed numpy which fails too often. Just if it's not installed, we
# may give it a try. See gh-3379.
try:
import numpy
except ImportError: # We do not have numpy installed
build_requires = ['numpy>=1.8.2']
else:
# If we're building a wheel, assume there already exist numpy wheels
# for this platform, so it is safe to add numpy to build requirements.
# See gh-5184.
build_requires = (['numpy>=1.8.2'] if 'bdist_wheel' in sys.argv[1:]
else [])

metadata = dict(
name='scipy',
maintainer="SciPy Developers",
Expand All @@ -442,8 +427,7 @@ def setup_package():
classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f],
platforms=["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
test_suite='nose.collector',
setup_requires=build_requires,
install_requires=build_requires,
install_requires=["numpy>=1.8.2"],
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
)

Expand Down

0 comments on commit 1ee1288

Please sign in to comment.