Skip to content

Commit d21ba7f

Browse files
authored
Merge pull request #1389 from arcondello/feature/Python3.13
Support Python 3.13
2 parents c627a74 + a1cbdf6 commit d21ba7f

4 files changed

Lines changed: 47 additions & 41 deletions

File tree

.circleci/config.yml

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ orbs:
55
win: circleci/windows@5.0
66
macos: circleci/macos@2.4
77

8+
commands:
9+
run-cibuildwheel:
10+
parameters:
11+
cibw-version:
12+
type: string
13+
default: 2.20.0
14+
steps:
15+
- run:
16+
name: run cibuildwheel
17+
shell: bash -eo pipefail
18+
command: |
19+
if [[ $OS == Windows_NT ]]; then
20+
python -m pip install --user cibuildwheel==<< parameters.cibw-version >>
21+
python -m cibuildwheel --output-dir dist
22+
else
23+
python3 -m pip install --user cibuildwheel==<< parameters.cibw-version >>
24+
python3 -m cibuildwheel --output-dir dist
25+
fi
26+
27+
- store_artifacts: &store-artifacts
28+
path: ./dist
29+
- persist_to_workspace: &persist-to-workspace
30+
root: ./dist/
31+
paths: .
32+
833
environment: &global-environment
934
PIP_PROGRESS_BAR: 'off'
1035

@@ -25,26 +50,7 @@ jobs:
2550
steps:
2651
- checkout
2752
- setup_remote_docker
28-
- restore_cache: &build-linux-restore-cache
29-
keys:
30-
- pip-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}
31-
- run: &build-linux-wheels
32-
name: build wheels
33-
command: |
34-
python3 -m venv env
35-
. env/bin/activate
36-
pip install pip --upgrade
37-
pip install cibuildwheel==2.16.2
38-
cibuildwheel --output-dir dist
39-
- save_cache: &build-linux-save-cache
40-
paths:
41-
- ~/.cache/pip
42-
key: pip-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}
43-
- store_artifacts: &store-artifacts
44-
path: ./dist
45-
- persist_to_workspace: &persist-to-workspace
46-
root: ./dist/
47-
paths: .
53+
- run-cibuildwheel
4854

4955
build-linux-aarch64:
5056
parameters:
@@ -63,19 +69,15 @@ jobs:
6369

6470
steps: &build-steps
6571
- checkout
66-
- restore_cache: *build-linux-restore-cache
67-
- run: *build-linux-wheels
68-
- save_cache: *build-linux-save-cache
69-
- store_artifacts: *store-artifacts
70-
- persist_to_workspace: *persist-to-workspace
72+
- run-cibuildwheel
7173

7274
build-osx:
7375
parameters:
7476
python-version:
7577
type: string
7678

7779
macos:
78-
xcode: 15.3.0
80+
xcode: 16.1.0
7981
resource_class: macos.m1.medium.gen1
8082

8183
environment:
@@ -85,11 +87,8 @@ jobs:
8587
steps:
8688
- checkout
8789
- macos/install-rosetta
88-
- restore_cache: *build-linux-restore-cache
89-
- run: *build-linux-wheels
90-
- save_cache: *build-linux-save-cache
91-
- store_artifacts: *store-artifacts
92-
- persist_to_workspace: *persist-to-workspace
90+
- run-cibuildwheel
91+
9392
build-sdist:
9493
docker:
9594
- image: cimg/python:3.9
@@ -124,14 +123,7 @@ jobs:
124123

125124
steps:
126125
- checkout
127-
- run:
128-
name: build wheels
129-
command: |
130-
python -m pip install pip --upgrade
131-
python -m pip install cibuildwheel==2.16.2
132-
python -m cibuildwheel --output-dir dist
133-
- store_artifacts: *store-artifacts
134-
- persist_to_workspace: *persist-to-workspace
126+
- run-cibuildwheel
135127

136128
deploy-all:
137129
docker:
@@ -318,7 +310,7 @@ workflows:
318310
- build-linux: &build
319311
matrix:
320312
parameters:
321-
python-version: &python-versions [3.8.9, 3.9.4, 3.10.0, 3.11.0, 3.12.0]
313+
python-version: &python-versions [3.8.9, 3.9.4, 3.10.0, 3.11.0, 3.12.0, 3.13.0]
322314
- build-linux-aarch64: *build
323315
- build-sdist
324316
- build-osx: *build
@@ -335,6 +327,15 @@ workflows:
335327
# test the lowest supported numpy and the latest
336328
dependencies: [oldest-supported-numpy, numpy]
337329
python-version: *python-versions
330+
exclude:
331+
- dependencies: oldest-supported-numpy # oldest-supported-numpy deprecated after 3.12
332+
python-version: 3.13.0
333+
334+
# this one is skipped because there isn't a 3.13.0-slim docker image yet
335+
# also, this would be identical to the tests done by cibuildwheel for now
336+
# we can restore this once there is a non-rc release of 3.13
337+
- dependencies: numpy
338+
python-version: 3.13.0
338339
- test-linux-cpp
339340
- test-osx-cpp
340341
- test-sdist:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
features:
3+
- Support Python 3.13.

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
oldest-supported-numpy
1+
oldest-supported-numpy; python_version < '3.13'
2+
numpy==2.1.0; python_version >= '3.13'
23
cython==3.0.10
34

45
reno==3.3.0 # for changelog

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ classifiers =
1414
Programming Language :: Python :: 3.10
1515
Programming Language :: Python :: 3.11
1616
Programming Language :: Python :: 3.12
17+
Programming Language :: Python :: 3.13
1718
Programming Language :: Python :: 3 :: Only
1819
Programming Language :: Python :: Implementation :: CPython
1920
license = Apache 2.0

0 commit comments

Comments
 (0)