-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Specify build requirements in pyproject.toml (PEP 517) #25227
Changes from 10 commits
7386535
68eb18a
faf7df7
88e0544
5fe770d
c0deaf9
bcd3f5c
d8cd7e6
6ee4e35
282d317
09880a3
cec7053
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# When changing the version numbers here, also adjust them in `setup.py` | ||
[build-system] | ||
requires = [ | ||
"setuptools", | ||
"wheel", | ||
"Cython >= 0.28.2", # required for VCS build, optional for released source | ||
"numpy==1.13.3; python_version<'3.7'", | ||
"numpy==1.14.5; python_version>='3.7'", | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,16 @@ | |
from distutils.version import LooseVersion | ||
from setuptools import setup, Command, find_packages | ||
|
||
# Taken from https://github.com/jupyterhub/traefik-proxy/ | ||
# commit: 0f16dc307b72e613e71067b6498f82728461434a | ||
# | ||
# ensure cwd is on sys.path | ||
# workaround bug in pip 19.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think all of this can be removed now, see also discussion below |
||
# This is needed to load versioneer that lies alongside the setup.py | ||
here = os.path.dirname(__file__) | ||
if here not in sys.path: | ||
sys.path.insert(0, here) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, added a comment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW, this workaround might not be needed any more, as it should be fixed in setuptools/pip (pypa/pip#6212), which will be released in the coming hours it seems There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would keep this in here for a bit as the pip release for that was not done. (From another bug report it seems like it will be in the release coming out this weekend but I won't count on that). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New Pip/Setuptools to fix this have been released in the meantime. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed this again |
||
|
||
# versioning | ||
import versioneer | ||
cmdclass = versioneer.get_cmdclass() | ||
|
@@ -30,14 +40,17 @@ def is_platform_mac(): | |
return sys.platform == 'darwin' | ||
|
||
|
||
min_numpy_ver = '1.13.3' | ||
# When changing the version numbers here, also adjust them in `pyproject.toml` | ||
numpy_requires = [ | ||
"numpy>=1.13.3; python_version<'3.7'", | ||
"numpy>=1.14; python_version>='3.7'", | ||
] | ||
setuptools_kwargs = { | ||
'install_requires': [ | ||
'python-dateutil >= 2.5.0', | ||
'pytz >= 2015.4', | ||
'numpy >= {numpy_ver}'.format(numpy_ver=min_numpy_ver), | ||
], | ||
'setup_requires': ['numpy >= {numpy_ver}'.format(numpy_ver=min_numpy_ver)], | ||
] + numpy_requires, | ||
'setup_requires': numpy_requires, | ||
'zip_safe': False, | ||
} | ||
|
||
|
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.
some merge left-overs?