Skip to content

Commit c7ec566

Browse files
Backport PR #58087 on branch 2.2.x (BLD: Build wheels using numpy 2.0rc1) (#58105)
Backport PR #58087: BLD: Build wheels using numpy 2.0rc1 Co-authored-by: Thomas Li <[email protected]>
1 parent 691fc88 commit c7ec566

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

Diff for: .circleci/config.yml

-4
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ jobs:
7272
no_output_timeout: 30m # Sometimes the tests won't generate any output, make sure the job doesn't get killed by that
7373
command: |
7474
pip3 install cibuildwheel==2.15.0
75-
# When this is a nightly wheel build, allow picking up NumPy 2.0 dev wheels:
76-
if [[ "$IS_SCHEDULE_DISPATCH" == "true" || "$IS_PUSH" != 'true' ]]; then
77-
export CIBW_ENVIRONMENT="PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
78-
fi
7975
cibuildwheel --prerelease-pythons --output-dir wheelhouse
8076
8177
environment:

Diff for: .github/workflows/wheels.yml

-12
Original file line numberDiff line numberDiff line change
@@ -147,18 +147,6 @@ jobs:
147147
CIBW_PRERELEASE_PYTHONS: True
148148
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
149149

150-
- name: Build nightly wheels (with NumPy pre-release)
151-
if: ${{ (env.IS_SCHEDULE_DISPATCH == 'true' && env.IS_PUSH != 'true') }}
152-
uses: pypa/[email protected]
153-
with:
154-
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
155-
env:
156-
# The nightly wheels should be build witht he NumPy 2.0 pre-releases
157-
# which requires the additional URL.
158-
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
159-
CIBW_PRERELEASE_PYTHONS: True
160-
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
161-
162150
- name: Set up Python
163151
uses: mamba-org/setup-micromamba@v1
164152
with:

Diff for: pyproject.toml

+6-1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ setup = ['--vsenv'] # For Windows
153153
skip = "cp36-* cp37-* cp38-* pp* *_i686 *_ppc64le *_s390x"
154154
build-verbosity = "3"
155155
environment = {LDFLAGS="-Wl,--strip-all"}
156+
# TODO: remove this once numpy 2.0 proper releases
157+
# and specify numpy 2.0 as a dependency in [build-system] requires in pyproject.toml
158+
before-build = "pip install numpy==2.0.0rc1"
156159
test-requires = "hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0"
157160
test-command = """
158161
PANDAS_CI='1' python -c 'import pandas as pd; \
@@ -161,7 +164,9 @@ test-command = """
161164
"""
162165

163166
[tool.cibuildwheel.windows]
164-
before-build = "pip install delvewheel"
167+
# TODO: remove this once numpy 2.0 proper releases
168+
# and specify numpy 2.0 as a dependency in [build-system] requires in pyproject.toml
169+
before-build = "pip install delvewheel numpy==2.0.0rc1"
165170
repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel}"
166171

167172
[[tool.cibuildwheel.overrides]]

0 commit comments

Comments
 (0)