Skip to content

Commit e0a38c6

Browse files
authored
Merge pull request #27993 from ksunden/np_2_build
Unpin numpy 2, build against prerelease numpy in CIBW
2 parents 8f1698f + 0ec1774 commit e0a38c6

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.github/workflows/cibuildwheel.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ jobs:
9494
runs-on: ${{ matrix.os }}
9595
env:
9696
CIBW_BEFORE_BUILD: >-
97-
pip install certifi numpy>=1.25 &&
97+
pip install certifi &&
9898
rm -rf {package}/build
9999
CIBW_BEFORE_BUILD_WINDOWS: >-
100-
pip install certifi delvewheel numpy>=1.25 &&
100+
pip install certifi delvewheel &&
101101
rm -rf {package}/build
102102
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >-
103103
delvewheel repair -w {dest_dir} {wheel}

pyproject.toml

+12-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@
22
build-backend = "setuptools.build_meta"
33
requires = [
44
"certifi>=2020.06.20",
5-
"numpy>=1.25",
65
"pybind11>=2.6",
76
"setuptools>=64",
87
"setuptools_scm>=7",
8+
9+
# Comments on numpy build requirement range:
10+
#
11+
# 1. >=2.0.x is the numpy requirement for wheel builds for distribution
12+
# on PyPI - building against 2.x yields wheels that are also
13+
# ABI-compatible with numpy 1.x at runtime.
14+
# 2. Note that building against numpy 1.x works fine too - users and
15+
# redistributors can do this by installing the numpy version they like
16+
# and disabling build isolation.
17+
# 3. The <2.3 upper bound is for matching the numpy deprecation policy,
18+
# it should not be loosened.
19+
"numpy>=2.0.0rc1,<2.3",
920
]
1021

1122
[tool.setuptools_scm]

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def make_release_tree(self, base_dir, files):
333333
"cycler>=0.10",
334334
"fonttools>=4.22.0",
335335
"kiwisolver>=1.3.1",
336-
"numpy>=1.21,<2",
336+
"numpy>=1.21",
337337
"packaging>=20.0",
338338
"pillow>=8",
339339
"pyparsing>=2.3.1",

0 commit comments

Comments
 (0)