Skip to content

Commit

Permalink
Fix numpy versions
Browse files Browse the repository at this point in the history
  • Loading branch information
kounelisagis committed Jun 17, 2024
1 parent b186a71 commit b39279c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 16 deletions.
13 changes: 4 additions & 9 deletions misc/requirements_wheel.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# numpy pinning for ABI forward-compatibility
numpy==1.16.5 ; python_version < "3.8" and platform_machine !='aarch64'
numpy==1.17.* ; python_version == "3.8" and platform_machine !='aarch64'
numpy==1.19.4 ; python_version == "3.9" and platform_machine !='aarch64'

# NOTE: oldest-supported-numpy (1.19.2) had forward ABI compat problems
numpy==1.20.* ; python_version < "3.10" and platform_machine=='aarch64'
numpy==1.21.* ; python_version == "3.10"
numpy>=1.23.2 ; python_version >= "3.11"
numpy==1.17.*,<2.0 ; python_version == '3.8' and platform_machine not in 'arm64|aarch64'
numpy==1.19.*,<2.0 ; python_version == '3.8' and platform_machine == 'aarch64'
numpy==1.21.*,<2.0 ; python_version == '3.8' and platform_machine == 'arm64'
numpy>=1.25,<2.0 ; python_version >= '3.9'

#-------------------------------

Expand Down
19 changes: 17 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
[build-system]
requires = ["setuptools>=64", "wheel", "pybind11", "Cython"]
requires = [
"setuptools>=64",
"wheel",
"pybind11",
"Cython",
"numpy==1.17.*,<2.0 ; python_version == '3.8' and platform_machine not in 'arm64|aarch64'",
"numpy==1.19.*,<2.0 ; python_version == '3.8' and platform_machine == 'aarch64'",
"numpy==1.21.*,<2.0 ; python_version == '3.8' and platform_machine == 'arm64'",
"numpy>=1.25,<2.0 ; python_version >= '3.9'",
]
build-backend = "setuptools.build_meta"

[project]
Expand Down Expand Up @@ -33,7 +42,13 @@ classifiers=[
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dynamic = ["version", "dependencies"]
dependencies = [
"numpy>=1.17,<2.0 ; python_version == '3.8' and platform_machine not in 'arm64|aarch64'",
"numpy>=1.19,<2.0 ; python_version == '3.8' and platform_machine == 'aarch64'",
"numpy>=1.21,<2.0 ; python_version == '3.8' and platform_machine == 'arm64'",
"numpy>=1.25,<2.0 ; python_version >= '3.9'",
]
dynamic = ["version"]

[tool.setuptools.packages.find]
exclude = ["*.pyc", ".pytest_cache/*", ".hypothesis/*"]
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
numpy>=1.16.5 ; python_version < "3.10" and platform_machine != 'aarch64'
numpy>=1.19.2 ; python_version < "3.10" and platform_machine == 'aarch64'
numpy>=1.21.0 ; python_version == "3.10"
numpy>=1.23.2 ; python_version >= "3.11"
numpy>=1.17,<2.0 ; python_version == '3.8' and platform_machine not in 'arm64|aarch64'
numpy>=1.19,<2.0 ; python_version == '3.8' and platform_machine == 'aarch64'
numpy>=1.21,<2.0 ; python_version == '3.8' and platform_machine == 'arm64'
numpy>=1.25,<2.0 ; python_version >= '3.9'
packaging

contextvars ;python_version<"3.7"
Expand Down
5 changes: 4 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
numpy >= 1.16.5
numpy>=1.17,<2.0 ; python_version == '3.8' and platform_machine not in 'arm64|aarch64'
numpy>=1.19,<2.0 ; python_version == '3.8' and platform_machine == 'aarch64'
numpy>=1.21,<2.0 ; python_version == '3.8' and platform_machine == 'arm64'
numpy>=1.25,<2.0 ; python_version >= '3.9'

# ------------------------------------------------
# ** MUST sync with misc/requirements_wheel.txt **
Expand Down

0 comments on commit b39279c

Please sign in to comment.