Skip to content

MNT simplify pyproject.toml by using oldest-supported-numpy #18900

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

Merged
merged 1 commit into from
Feb 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 5 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,11 @@ requires = [
"wheel",
"Cython>=0.28.5",

# PyPy needs numpy >= 1.14.0
# platform_python_implementation!='CPython' not needed >= Python 3.7 which is numpy 1.14.5
"numpy==1.13.3; python_version=='3.6' and platform_machine!='aarch64' and platform_system!='AIX' and platform_python_implementation=='CPython'",
"numpy==1.14.0; python_version=='3.6' and platform_machine!='aarch64' and platform_system!='AIX' and platform_python_implementation!='CPython'",

# AIX needs numpy >= 1.16.0
# platform_system!='AIX' not needed >= Python 3.8 which is numpy 1.17.3
"numpy==1.16.0; python_version=='3.6' and platform_machine!='aarch64' and platform_system=='AIX'",
"numpy==1.16.0; python_version=='3.7' and platform_machine!='aarch64' and platform_system=='AIX'",

# ARM needs numpy >= 1.19.0
# platform_machine!='aarch64' not needed >= Python 3.9 which is numpy 1.19.3
"numpy==1.19.0; python_version=='3.6' and platform_machine=='aarch64'",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a reference, this is 1.19.2 in https://github.com/scipy/oldest-supported-numpy/blob/master/setup.cfg but I am okay with this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a result of @rgommers comment here scipy/oldest-supported-numpy#13 (comment)

"numpy==1.19.0; python_version=='3.7' and platform_machine=='aarch64'",
"numpy==1.19.0; python_version=='3.8' and platform_machine=='aarch64'",

# default numpy requirements
"numpy==1.14.5; python_version=='3.7' and platform_machine!='aarch64' and platform_system!='AIX'",
"numpy==1.17.3; python_version=='3.8' and platform_machine!='aarch64'",
"numpy==1.19.3; python_version=='3.9'",
# use oldest-supported-numpy which provides the oldest numpy version with
# wheels on PyPI
#
# see: https://github.com/scipy/oldest-supported-numpy/blob/master/setup.cfg
"oldest-supported-numpy",

"scipy>=0.19.1",
]
2 changes: 1 addition & 1 deletion sklearn/_min_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# numpy scipy and cython should by in sync with pyproject.toml
if platform.python_implementation() == 'PyPy':
SCIPY_MIN_VERSION = '1.1.0'
NUMPY_MIN_VERSION = '1.14.0'
NUMPY_MIN_VERSION = '1.19.0'
else:
SCIPY_MIN_VERSION = '0.19.1'
NUMPY_MIN_VERSION = '1.13.3'
Expand Down