Skip to content

Commit d6bd7be

Browse files
MNT simplify pyproject.toml by using oldest-supported-numpy [cd build] (scikit-learn#18900)
1 parent 80c47b0 commit d6bd7be

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

pyproject.toml

+5-20
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,11 @@ requires = [
55
"wheel",
66
"Cython>=0.28.5",
77

8-
# PyPy needs numpy >= 1.14.0
9-
# platform_python_implementation!='CPython' not needed >= Python 3.7 which is numpy 1.14.5
10-
"numpy==1.13.3; python_version=='3.6' and platform_machine!='aarch64' and platform_system!='AIX' and platform_python_implementation=='CPython'",
11-
"numpy==1.14.0; python_version=='3.6' and platform_machine!='aarch64' and platform_system!='AIX' and platform_python_implementation!='CPython'",
12-
13-
# AIX needs numpy >= 1.16.0
14-
# platform_system!='AIX' not needed >= Python 3.8 which is numpy 1.17.3
15-
"numpy==1.16.0; python_version=='3.6' and platform_machine!='aarch64' and platform_system=='AIX'",
16-
"numpy==1.16.0; python_version=='3.7' and platform_machine!='aarch64' and platform_system=='AIX'",
17-
18-
# ARM needs numpy >= 1.19.0
19-
# platform_machine!='aarch64' not needed >= Python 3.9 which is numpy 1.19.3
20-
"numpy==1.19.0; python_version=='3.6' and platform_machine=='aarch64'",
21-
"numpy==1.19.0; python_version=='3.7' and platform_machine=='aarch64'",
22-
"numpy==1.19.0; python_version=='3.8' and platform_machine=='aarch64'",
23-
24-
# default numpy requirements
25-
"numpy==1.14.5; python_version=='3.7' and platform_machine!='aarch64' and platform_system!='AIX'",
26-
"numpy==1.17.3; python_version=='3.8' and platform_machine!='aarch64'",
27-
"numpy==1.19.3; python_version=='3.9'",
8+
# use oldest-supported-numpy which provides the oldest numpy version with
9+
# wheels on PyPI
10+
#
11+
# see: https://github.com/scipy/oldest-supported-numpy/blob/master/setup.cfg
12+
"oldest-supported-numpy",
2813

2914
"scipy>=0.19.1",
3015
]

sklearn/_min_dependencies.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# numpy scipy and cython should by in sync with pyproject.toml
77
if platform.python_implementation() == 'PyPy':
88
SCIPY_MIN_VERSION = '1.1.0'
9-
NUMPY_MIN_VERSION = '1.14.0'
9+
NUMPY_MIN_VERSION = '1.19.0'
1010
else:
1111
SCIPY_MIN_VERSION = '0.19.1'
1212
NUMPY_MIN_VERSION = '1.13.3'

0 commit comments

Comments
 (0)