Skip to content

Commit

Permalink
Merge pull request #101 from tlambert03/oldestnumpy
Browse files Browse the repository at this point in the history
build: uses oldest-supported-numpy in build requires
  • Loading branch information
marktsuchida authored Nov 13, 2023
2 parents c12ae9d + 44247b8 commit 34a179c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
17 changes: 3 additions & 14 deletions maintainer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,20 +121,9 @@ and the binary wheels attached.

- NumPy ABI compatibility needs to be maintained by building against a
reasonably old version of NumPy when packaging for public distribution (cf.
https://github.com/numpy/numpy/issues/5888).

In practice, we should use the oldest NumPy for which wheels are available on
PyPI for the given Python version (and all 3 platforms):

- Python 3.8 - NumPy 1.17.3
- Python 3.9 - NumPy 1.19.3
- Python 3.10 - NumPy 1.21.3
- Python 3.11 - NumPy 1.23.2
- Python 3.12 - Numpy 1.26.0

Those versions are reflected in the `[build-system.requires]` section of
`pyproject.toml`, which takes care of creating the appropriate build
environment for the wheel.
https://github.com/numpy/numpy/issues/5888). We do this by including
[`oldest-supported-numpy`](https://github.com/scipy/oldest-supported-numpy)
in our build requires.

## Building with debug symbols on Windows

Expand Down
11 changes: 1 addition & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
# https://peps.python.org/pep-0517/
[build-system]
requires = [
"setuptools >=61.0.0",
"swig >=4",
"numpy==1.14.5; python_version=='3.7'",
"numpy==1.17.3; python_version=='3.8'",
"numpy==1.19.3; python_version=='3.9'",
"numpy==1.21.3; python_version=='3.10'",
"numpy==1.23.2; python_version=='3.11'",
"numpy==1.26.0; python_version=='3.12'",
]
requires = ["setuptools >=61.0.0", "swig >=4", "oldest-supported-numpy"]
build-backend = "setuptools.build_meta"


Expand Down

0 comments on commit 34a179c

Please sign in to comment.