Skip to content

Commit

Permalink
Unpin numpy 2 for install, build against numpy rc for isolated builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ksunden committed Apr 2, 2024
1 parent 06269cd commit 0ec1774
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cibuildwheel.yml
Expand Up @@ -94,10 +94,10 @@ jobs:
runs-on: ${{ matrix.os }}
env:
CIBW_BEFORE_BUILD: >-
pip install certifi numpy>=1.25 &&
pip install certifi &&
rm -rf {package}/build
CIBW_BEFORE_BUILD_WINDOWS: >-
pip install certifi delvewheel numpy>=1.25 &&
pip install certifi delvewheel &&
rm -rf {package}/build
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >-
delvewheel repair -w {dest_dir} {wheel}
Expand Down
13 changes: 12 additions & 1 deletion pyproject.toml
Expand Up @@ -2,10 +2,21 @@
build-backend = "setuptools.build_meta"
requires = [
"certifi>=2020.06.20",
"numpy>=1.25",
"pybind11>=2.6",
"setuptools>=64",
"setuptools_scm>=7",

# Comments on numpy build requirement range:
#
# 1. >=2.0.x is the numpy requirement for wheel builds for distribution
# on PyPI - building against 2.x yields wheels that are also
# ABI-compatible with numpy 1.x at runtime.
# 2. Note that building against numpy 1.x works fine too - users and
# redistributors can do this by installing the numpy version they like
# and disabling build isolation.
# 3. The <2.3 upper bound is for matching the numpy deprecation policy,
# it should not be loosened.
"numpy>=2.0.0rc1,<2.3",
]

[tool.setuptools_scm]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -333,7 +333,7 @@ def make_release_tree(self, base_dir, files):
"cycler>=0.10",
"fonttools>=4.22.0",
"kiwisolver>=1.3.1",
"numpy>=1.21,<2",
"numpy>=1.21",
"packaging>=20.0",
"pillow>=8",
"pyparsing>=2.3.1",
Expand Down

0 comments on commit 0ec1774

Please sign in to comment.