Skip to content

Commit ace9958

Browse files
committed
Adapt Numpy dependencies
1 parent a0034e0 commit ace9958

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

print_deps.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
import tomli as tlib
1313

1414

15+
IS_MUSL = os.environ.get('MB_ML_LIBC') == 'musllinux'
16+
17+
1518
def get_phase_requirements(repo_path, phase='build'):
1619
toml = (Path(repo_path) / 'pyproject.toml').read_text()
1720
config = tlib.loads(toml)
@@ -28,15 +31,13 @@ def get_phase_requirements(repo_path, phase='build'):
2831
def get_numpy_requirement(py_ver):
2932
major, minor, *_ = py_ver.split('.')
3033
assert major == "3"
31-
musl = os.environ.get('MB_ML_LIBC') == 'musllinux'
32-
# musllinux wheels started at 1.25.0
33-
np_version = "1.22.0" if not musl else '1.25.0'
3434
minor = int(minor)
35-
if minor >= 12:
36-
np_version = "1.26.0"
37-
elif minor >= 11 and not musl:
38-
np_version = "1.23.2"
39-
return np_version
35+
# SPEC0-minimum as of Dec 23, 2023
36+
if minor <= 8:
37+
if IS_MUSL:
38+
raise RuntimeError("MUSL doesn't have 3.8 wheels")
39+
return "1.22.0"
40+
return "2.0.0"
4041

4142

4243
def get_parser():

0 commit comments

Comments
 (0)