Skip to content

Commit db08159

Browse files
committed
update: enhance Python version support
1 parent 6b7f852 commit db08159

3 files changed

Lines changed: 45 additions & 22 deletions

File tree

.github/workflows/lint-test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,17 @@ jobs:
3434
run: uv run --no-sync pyright tests examples
3535

3636
python-tests:
37-
name: Python tests
37+
name: Python tests py${{ matrix.python_version }}
3838
runs-on: macos-14
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
python_version: ["3.10", "3.14"]
3943
steps:
4044
- uses: actions/checkout@v4
4145
- uses: actions/setup-python@v5
4246
with:
43-
python-version: "3.10"
47+
python-version: ${{ matrix.python_version }}
4448
- uses: astral-sh/setup-uv@v4
4549
with:
4650
enable-cache: true

.github/workflows/release.yml

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,39 +14,38 @@ env:
1414

1515
jobs:
1616
linux:
17-
name: Linux ${{ matrix.target }} py${{ matrix.python.version }}
18-
runs-on: ubuntu-22.04
17+
name: Linux ${{ matrix.target }} py3.10-3.14
18+
runs-on: ${{ matrix.runner }}
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
python:
23-
- version: "3.10"
24-
tag: cp310
25-
- version: "3.11"
26-
tag: cp311
27-
- version: "3.12"
28-
tag: cp312
29-
- version: "3.13"
30-
tag: cp313
31-
# rusty_v8 v147.4.0 publishes prebuilt Linux archives only for these
32-
# GNU targets. musllinux and other architectures require source builds.
33-
target: [x86_64, aarch64]
22+
include:
23+
- runner: ubuntu-22.04
24+
target: x86_64
25+
- runner: ubuntu-24.04-arm
26+
target: aarch64
3427
steps:
3528
- uses: actions/checkout@v4
36-
- uses: actions/setup-python@v5
37-
with:
38-
python-version: ${{ matrix.python.version }}
3929
- name: Build wheel
4030
uses: PyO3/maturin-action@v1
31+
env:
32+
# rusty_v8's prebuilt Linux archive uses a TLS model that cannot be
33+
# linked into a Python extension module. Source builds inject
34+
# V8_TLS_USED_IN_LIBRARY through the v8 crate build script.
35+
V8_FROM_SOURCE: "1"
4136
with:
4237
target: ${{ matrix.target }}
4338
manylinux: auto
44-
args: --release --out dist --interpreter python${{ matrix.python.version }}
45-
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
39+
docker-options: -e V8_FROM_SOURCE=1
40+
args: >-
41+
--release
42+
--out dist
43+
--interpreter python3.10 python3.11 python3.12 python3.13 python3.14
44+
sccache: true
4645
- name: Upload wheel
4746
uses: actions/upload-artifact@v4
4847
with:
49-
name: wheels-linux-${{ matrix.target }}-${{ matrix.python.tag }}
48+
name: wheels-linux-${{ matrix.target }}
5049
path: dist
5150
if-no-files-found: error
5251

@@ -81,6 +80,12 @@ jobs:
8180
architecture: x64
8281
version: "3.13"
8382
tag: cp313
83+
- runner: windows-latest
84+
target: x64
85+
python:
86+
architecture: x64
87+
version: "3.14"
88+
tag: cp314
8489
- runner: windows-11-arm
8590
target: aarch64
8691
python:
@@ -99,6 +104,12 @@ jobs:
99104
architecture: arm64
100105
version: "3.13"
101106
tag: cp313
107+
- runner: windows-11-arm
108+
target: aarch64
109+
python:
110+
architecture: arm64
111+
version: "3.14"
112+
tag: cp314
102113
steps:
103114
- uses: actions/checkout@v4
104115
- uses: actions/setup-python@v5
@@ -133,6 +144,8 @@ jobs:
133144
tag: cp312
134145
- version: "3.13"
135146
tag: cp313
147+
- version: "3.14"
148+
tag: cp314
136149
platform:
137150
- runner: macos-13
138151
target: x86_64

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ readme = "README.md"
99
requires-python = ">=3.10"
1010
classifiers = [
1111
"Programming Language :: Rust",
12+
"Programming Language :: Python :: 3",
13+
"Programming Language :: Python :: 3.10",
14+
"Programming Language :: Python :: 3.11",
15+
"Programming Language :: Python :: 3.12",
16+
"Programming Language :: Python :: 3.13",
17+
"Programming Language :: Python :: 3.14",
1218
"Programming Language :: Python :: Implementation :: CPython",
1319
"Programming Language :: Python :: Implementation :: PyPy",
1420
]

0 commit comments

Comments
 (0)