Skip to content

Commit e6ff6f9

Browse files
build: Add support for NumPy 2.0 wheels
* Add numpy>=2.0.0 to build-system requires to build NumPy 1.x and 2.x compatible wheels. - c.f. https://numpy.org/doc/stable/dev/depending_on_numpy.html#numpy-2-0-specific-advice - As NumPy 2.0 is Python 3.9+, also need to conditionally support 'oldest-supported-numpy' for Python 3.8. * Remove wheel from build-system requires as it is never required and injected automatically by setuptools only when needed. - c.f. https://learn.scientific-python.org/development/guides/packaging-classic/
1 parent cba9c7b commit e6ff6f9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pyproject.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "oldest-supported-numpy", "cython>=0.23"]
3-
build-backend = "setuptools.build_meta"
2+
requires = [
3+
"setuptools>=42",
4+
"oldest-supported-numpy; python_version < '3.9'",
5+
"numpy>=2.0.0; python_version >= '3.9'",
6+
"cython>=0.23"
7+
]
8+
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)