Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
pkgprefix: mingw-w64-clang-x86_64
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: setup-msys2
uses: msys2/setup-msys2@v2
Expand Down Expand Up @@ -61,19 +61,19 @@ jobs:
poetry run coverage xml -i

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5

ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', 'pypy-3.11']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.14t', 'pypy-3.11']
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
poetry run coverage xml -i

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5

- name: Run linters
if: ${{ !contains(matrix.python-version, 'pypy') }}
Expand All @@ -116,7 +116,7 @@ jobs:
poetry run mypy .

- name: Build docs
if: ${{ !contains(matrix.python-version, 'pypy') && !contains(matrix.python-version, '3.14') }}
if: ${{ !contains(matrix.python-version, 'pypy') }}
run: |
poetry install --with docs
poetry run python -m sphinx -W -a -E -b html -n docs docs/_build
Expand All @@ -126,7 +126,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', 'pypy-3.11']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.14t', 'pypy-3.11']
architecture: ['x64']
os: ['windows-2022']
include:
Expand All @@ -140,11 +140,11 @@ jobs:
architecture: 'arm64'
os: 'windows-11-arm'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
Expand Down Expand Up @@ -191,14 +191,14 @@ jobs:
poetry run coverage xml -i

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5

macos:
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Install dependencies
run: |
Expand All @@ -221,4 +221,4 @@ jobs:
poetry run coverage xml -i

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
15 changes: 8 additions & 7 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.11'

Expand All @@ -24,7 +24,7 @@ jobs:
- name: Build sdist
run: python -m build --sdist

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v5
with:
name: sdist
path: ./dist/*.tar.gz
Expand All @@ -47,24 +47,25 @@ jobs:
arch: arm64

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch : ${{ matrix.arch }}

- name: Build wheels
uses: pypa/cibuildwheel@v3.1.0
uses: pypa/cibuildwheel@v3.2.1
env:
CFLAGS: "-DCAIRO_WIN32_STATIC_BUILD=1"
CIBW_BEFORE_BUILD: "python {package}/.ci/download-cairo-win32.py ${{ matrix.arch }}"
CIBW_BUILD: cp310-${{ matrix.platform_id }} cp311-${{ matrix.platform_id }} cp312-${{ matrix.platform_id }} cp313-${{ matrix.platform_id }} cp314-${{ matrix.platform_id }}
CIBW_BUILD: cp310-${{ matrix.platform_id }} cp311-${{ matrix.platform_id }} cp312-${{ matrix.platform_id }} cp313-${{ matrix.platform_id }} cp314-${{ matrix.platform_id }} cp314t-${{ matrix.platform_id }}
CIBW_SKIP: cp314t-win32
CIBW_TEST_REQUIRES: pytest==8.3.5
CIBW_TEST_COMMAND: bash {package}/.ci/test-wheels.sh {package}
CIBW_ENVIRONMENT_WINDOWS: PKG_CONFIG_PATH='${{ github.workspace }}/cairo-prebuild/lib/pkgconfig' PKG_CONFIG='${{ github.workspace }}/cairo-prebuild/bin/pkgconf.exe'

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v5
with:
name: "wheel-${{ matrix.arch }}"
path: ./wheelhouse/*.whl
3 changes: 3 additions & 0 deletions cairo/cairomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,9 @@ static int exec_cairo(PyObject *m)

static PyModuleDef_Slot cairo_slots[] = {
{Py_mod_exec, (void*)exec_cairo},
#if PY_VERSION_HEX >= 0x030D0000
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
#endif
{0, NULL},
};

Expand Down
3 changes: 3 additions & 0 deletions tests/cmodule/cmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ static int exec_cmod(PyObject *m)

static PyModuleDef_Slot cmod_slots[] = {
{Py_mod_exec, exec_cmod},
#if PY_VERSION_HEX >= 0x030D0000
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
#endif
{0, NULL}};

static struct PyModuleDef cmod_module = {
Expand Down
Loading