Skip to content

Commit

Permalink
Merge pull request #1389 from arcondello/feature/Python3.13
Browse files Browse the repository at this point in the history
Support Python 3.13
  • Loading branch information
arcondello authored Sep 3, 2024
2 parents c627a74 + a1cbdf6 commit d21ba7f
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 41 deletions.
81 changes: 41 additions & 40 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,31 @@ orbs:
win: circleci/windows@5.0
macos: circleci/macos@2.4

commands:
run-cibuildwheel:
parameters:
cibw-version:
type: string
default: 2.20.0
steps:
- run:
name: run cibuildwheel
shell: bash -eo pipefail
command: |
if [[ $OS == Windows_NT ]]; then
python -m pip install --user cibuildwheel==<< parameters.cibw-version >>
python -m cibuildwheel --output-dir dist
else
python3 -m pip install --user cibuildwheel==<< parameters.cibw-version >>
python3 -m cibuildwheel --output-dir dist
fi
- store_artifacts: &store-artifacts
path: ./dist
- persist_to_workspace: &persist-to-workspace
root: ./dist/
paths: .

environment: &global-environment
PIP_PROGRESS_BAR: 'off'

Expand All @@ -25,26 +50,7 @@ jobs:
steps:
- checkout
- setup_remote_docker
- restore_cache: &build-linux-restore-cache
keys:
- pip-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}
- run: &build-linux-wheels
name: build wheels
command: |
python3 -m venv env
. env/bin/activate
pip install pip --upgrade
pip install cibuildwheel==2.16.2
cibuildwheel --output-dir dist
- save_cache: &build-linux-save-cache
paths:
- ~/.cache/pip
key: pip-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}
- store_artifacts: &store-artifacts
path: ./dist
- persist_to_workspace: &persist-to-workspace
root: ./dist/
paths: .
- run-cibuildwheel

build-linux-aarch64:
parameters:
Expand All @@ -63,19 +69,15 @@ jobs:

steps: &build-steps
- checkout
- restore_cache: *build-linux-restore-cache
- run: *build-linux-wheels
- save_cache: *build-linux-save-cache
- store_artifacts: *store-artifacts
- persist_to_workspace: *persist-to-workspace
- run-cibuildwheel

build-osx:
parameters:
python-version:
type: string

macos:
xcode: 15.3.0
xcode: 16.1.0
resource_class: macos.m1.medium.gen1

environment:
Expand All @@ -85,11 +87,8 @@ jobs:
steps:
- checkout
- macos/install-rosetta
- restore_cache: *build-linux-restore-cache
- run: *build-linux-wheels
- save_cache: *build-linux-save-cache
- store_artifacts: *store-artifacts
- persist_to_workspace: *persist-to-workspace
- run-cibuildwheel

build-sdist:
docker:
- image: cimg/python:3.9
Expand Down Expand Up @@ -124,14 +123,7 @@ jobs:

steps:
- checkout
- run:
name: build wheels
command: |
python -m pip install pip --upgrade
python -m pip install cibuildwheel==2.16.2
python -m cibuildwheel --output-dir dist
- store_artifacts: *store-artifacts
- persist_to_workspace: *persist-to-workspace
- run-cibuildwheel

deploy-all:
docker:
Expand Down Expand Up @@ -318,7 +310,7 @@ workflows:
- build-linux: &build
matrix:
parameters:
python-version: &python-versions [3.8.9, 3.9.4, 3.10.0, 3.11.0, 3.12.0]
python-version: &python-versions [3.8.9, 3.9.4, 3.10.0, 3.11.0, 3.12.0, 3.13.0]
- build-linux-aarch64: *build
- build-sdist
- build-osx: *build
Expand All @@ -335,6 +327,15 @@ workflows:
# test the lowest supported numpy and the latest
dependencies: [oldest-supported-numpy, numpy]
python-version: *python-versions
exclude:
- dependencies: oldest-supported-numpy # oldest-supported-numpy deprecated after 3.12
python-version: 3.13.0

# this one is skipped because there isn't a 3.13.0-slim docker image yet
# also, this would be identical to the tests done by cibuildwheel for now
# we can restore this once there is a non-rc release of 3.13
- dependencies: numpy
python-version: 3.13.0
- test-linux-cpp
- test-osx-cpp
- test-sdist:
Expand Down
3 changes: 3 additions & 0 deletions releasenotes/notes/python3.13-2c6631bc011816a2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
features:
- Support Python 3.13.
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
oldest-supported-numpy
oldest-supported-numpy; python_version < '3.13'
numpy==2.1.0; python_version >= '3.13'
cython==3.0.10

reno==3.3.0 # for changelog
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ classifiers =
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: Implementation :: CPython
license = Apache 2.0
Expand Down

0 comments on commit d21ba7f

Please sign in to comment.