Skip to content

Commit

Permalink
Unpin Numpy version for building wheels
Browse files Browse the repository at this point in the history
Allow using any version of Numpy between 1.25 and 2. This will
allow us to use the latest release of Numpy on PyPI and take
advantage of prebuilt wheels for more platforms and architectures.

Use the new `NPY_TARGET_VERSION` macro to peform a
backward-compatible supporting versions of Numpy as old as 1.19.
  • Loading branch information
lpsinger committed Nov 20, 2023
1 parent 855a8f9 commit 25b68cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion astropy_healpix/setup_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ def get_extensions():
extra_compile_args=['-O2'],
py_limited_api=True,
define_macros=[('Py_LIMITED_API', 0x03090000),
('NPY_NO_DEPRECATED_API', 'NPY_1_19_API_VERSION')])
('NPY_TARGET_VERSION', 'NPY_1_19_API_VERSION')])

return [extension]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ requires = ["setuptools>=42.0.0",
"setuptools_scm",
"wheel",
"extension-helpers",
"numpy==1.25.1"]
"numpy>=1.25,<2"]

build-backend = 'setuptools.build_meta'

Expand Down

0 comments on commit 25b68cb

Please sign in to comment.