Skip to content

Commit 1b548d7

Browse files
lithomas1meeseeksmachine
authored andcommitted
Backport PR pandas-dev#55010: BLD: Build wheels for Python 3.12
1 parent 6db7b00 commit 1b548d7

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

.circleci/config.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
name: Build aarch64 wheels
4949
no_output_timeout: 30m # Sometimes the tests won't generate any output, make sure the job doesn't get killed by that
5050
command: |
51-
pip3 install cibuildwheel==2.14.1
51+
pip3 install cibuildwheel==2.15.0
5252
cibuildwheel --prerelease-pythons --output-dir wheelhouse
5353
environment:
5454
CIBW_BUILD: << parameters.cibw-build >>
@@ -92,5 +92,4 @@ workflows:
9292
only: /^v.*/
9393
matrix:
9494
parameters:
95-
# TODO: Enable Python 3.12 wheels when numpy releases a version that supports Python 3.12
96-
cibw-build: ["cp39-manylinux_aarch64", "cp310-manylinux_aarch64", "cp311-manylinux_aarch64"]#, "cp312-manylinux_aarch64"]
95+
cibw-build: ["cp39-manylinux_aarch64", "cp310-manylinux_aarch64", "cp311-manylinux_aarch64", "cp312-manylinux_aarch64"]

.github/workflows/wheels.yml

+9-7
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ jobs:
9797
- [macos-12, macosx_*]
9898
- [windows-2022, win_amd64]
9999
# TODO: support PyPy?
100-
# TODO: Enable Python 3.12 wheels when numpy releases a version that supports Python 3.12
101-
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"]]#, ["cp312", "3.12"]]
100+
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"]]
102101
env:
103102
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
104103
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
@@ -150,8 +149,10 @@ jobs:
150149
uses: mamba-org/setup-micromamba@v1
151150
with:
152151
environment-name: wheel-env
152+
# Use a fixed Python, since we might have an unreleased Python not
153+
# yet present on conda-forge
153154
create-args: >-
154-
python=${{ matrix.python[1] }}
155+
python=3.11
155156
anaconda-client
156157
wheel
157158
cache-downloads: true
@@ -167,12 +168,13 @@ jobs:
167168
shell: pwsh
168169
run: |
169170
$TST_CMD = @"
170-
python -m pip install pytz six numpy python-dateutil tzdata>=2022.1 hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-asyncio>=0.17;
171-
python -m pip install --find-links=pandas\wheelhouse --no-index pandas;
171+
python -m pip install hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-asyncio>=0.17;
172+
python -m pip install `$(Get-Item pandas\wheelhouse\*.whl);
172173
python -c `'import pandas as pd; pd.test(extra_args=[\"`\"--no-strict-data-files`\"\", \"`\"-m not clipboard and not single_cpu and not slow and not network and not db`\"\"])`';
173174
"@
174-
docker pull python:${{ matrix.python[1] }}-windowsservercore
175-
docker run --env PANDAS_CI='1' -v ${PWD}:C:\pandas python:${{ matrix.python[1] }}-windowsservercore powershell -Command $TST_CMD
175+
# add rc to the end of the image name if the Python version is unreleased
176+
docker pull python:${{ matrix.python[1] == '3.12' && '3.12-rc' || format('{0}-windowsservercore', matrix.python[1]) }}
177+
docker run --env PANDAS_CI='1' -v ${PWD}:C:\pandas python:${{ matrix.python[1] == '3.12' && '3.12-rc' || format('{0}-windowsservercore', matrix.python[1]) }} powershell -Command $TST_CMD
176178
177179
- uses: actions/upload-artifact@v3
178180
with:

pyproject.toml

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ requires = [
1010
# we don't want to force users to compile with 1.25 though
1111
# (Ideally, in the future, though, oldest-supported-numpy can be dropped when our min numpy is 1.25.x)
1212
"oldest-supported-numpy>=2022.8.16; python_version<'3.12'",
13-
"numpy>=1.22.4; python_version>='3.12'",
13+
# TODO: This needs to be updated when the official numpy 1.26 comes out
14+
"numpy>=1.26.0b1; python_version>='3.12'",
1415
"versioneer[toml]"
1516
]
1617

@@ -30,7 +31,9 @@ license = {file = 'LICENSE'}
3031
requires-python = '>=3.9'
3132
dependencies = [
3233
"numpy>=1.22.4; python_version<'3.11'",
33-
"numpy>=1.23.2; python_version>='3.11'",
34+
"numpy>=1.23.2; python_version=='3.11'",
35+
# TODO: This needs to be updated when the official numpy 1.26 comes out
36+
"numpy>=1.26.0b1; python_version>='3.12'",
3437
"python-dateutil>=2.8.2",
3538
"pytz>=2020.1",
3639
"tzdata>=2022.1"

0 commit comments

Comments
 (0)