Skip to content

Commit

Permalink
Support Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Aug 21, 2024
1 parent 52dd8dc commit 36aa76c
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 36 deletions.
71 changes: 48 additions & 23 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ jobs:

build-sdist:
name: Build sdist package
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout repos
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build sdist
run: python setup.py sdist

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sdist
path: ./dist/*


Expand All @@ -26,15 +27,28 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
pyver: [cp37, cp38, cp39, cp310, cp311, cp312]
os: [ubuntu-24.04, windows-latest, macos-latest]
pyver:
- cp38
- cp39
- cp310
- cp311
- cp312
- cp313
include:
- pyver: cp37
os: macos-13
- pyver: cp37
os: ubuntu-24.04
- pyver: cp37
os: windows-latest

steps:
- name: Checkout repos
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.1
uses: pypa/cibuildwheel@v2.20.0
env:
CIBW_BUILD: ${{matrix.pyver}}-*
CIBW_ARCHS_LINUX: auto
Expand All @@ -53,37 +67,46 @@ jobs:
pp*-macosx_*
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.pyver }}-${{ matrix.os }}
path: ./wheelhouse/*.whl


build-cross-wheel:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
pyver: [cp37, cp38, cp39, cp310, cp311, cp312]
pyver:
- cp37
- cp38
- cp39
- cp310
- cp311
- cp312
- cp313
arch: [aarch64, ppc64le]

steps:
- name: Checkout repos
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU for multi-arch build
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.1
uses: pypa/cibuildwheel@v2.20.0
env:
CIBW_BUILD: ${{matrix.pyver}}-*
CIBW_ARCHS: ${{matrix.arch}}

# Tests mostly fail because of some confusion with the python interpreter

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.pyver }}-${{ matrix.arch }}
path: ./wheelhouse/*.whl


Expand All @@ -92,14 +115,14 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
os: [ubuntu-24.04, windows-latest, macos-latest]

steps:
- name: Checkout repos
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.1
uses: pypa/cibuildwheel@v2.20.0
env:
CIBW_BUILD: pp*
CIBW_TEST_EXTRAS: test
Expand All @@ -115,31 +138,33 @@ jobs:
pp*-macosx_*
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels-pp-${{ matrix.os }}
path: ./wheelhouse/*.whl


build-cross-wheel-pypy:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false

steps:
- name: Checkout repos
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU for multi-arch build
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.1
uses: pypa/cibuildwheel@v2.20.0
env:
CIBW_BUILD: pp*

# Tests mostly fail because of some confusion with the python interpreter

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels-pp-cross
path: ./wheelhouse/*.whl
62 changes: 50 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,35 @@ on:
jobs:

linux-tests:
runs-on: ubuntu-20.04
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.8"]
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "pypy-3.8"
- "pypy-3.9"
- "pypy-3.10"
os:
- ubuntu-24.04
include:
- python-version: 3.7
os: ubuntu-22.04

steps:
- name: Checkout repos
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
allow-prereleases: true
architecture: x64

- name: Install Tox
Expand All @@ -39,17 +54,25 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
python-version:
- 3.7
- 3.8
- 3.9
- "3.10"
- "3.11"
- "3.12"
- "3.13"
architecture: ['x64', 'x86']

steps:
- name: Checkout repos
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
allow-prereleases: true
architecture: ${{matrix.architecture}}

- name: Install Tox
Expand All @@ -60,20 +83,35 @@ jobs:


macos-tests:
runs-on: macos-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
python-version:
- "3.11"
- "3.12"
- "3.13"
os:
- macos-latest
include:
- python-version: 3.7
os: macos-13
- python-version: 3.8
os: macos-13
- python-version: 3.9
os: macos-13
- python-version: "3.10"
os: macos-13

steps:
- name: Checkout repos
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
allow-prereleases: true

- name: Install Tox
run: pip install tox
Expand All @@ -87,7 +125,7 @@ jobs:

steps:
- name: Checkout repos
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Tox
run: xcrun python3 -m pip install tox
Expand Down
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Releases history
----------------

Unreleased
----------

- Add support for Python 3.13

Version 1.3.3
-------------

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
Operating System :: POSIX :: Linux
Operating System :: POSIX :: BSD
Operating System :: MacOS :: MacOS X
Expand Down
11 changes: 10 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, pypy-3.8
envlist = 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, pypy-3.8, pypy-3.9, pypy-3.10

[testenv]
commands =
Expand All @@ -25,8 +25,17 @@ basepython = python3.11
[testenv:3.12]
basepython = python3.12

[testenv:3.13]
basepython = python3.13

[testenv:pypy-3.8]
basepython = pypy3.8

[testenv:pypy-3.9]
basepython = pypy3.9

[testenv:pypy-3.10]
basepython = pypy3.10

[testenv:xcode]
basepython = {env:XCODE_PYTHON}

0 comments on commit 36aa76c

Please sign in to comment.