Skip to content

Commit fdae1e7

Browse files
Update CI: add PyPI publishing, fix Python versions, require tokenizer 3.6.0
- wheels.yml: Add sdist build and PyPI trusted publishing job - wheels.yml: Explicitly build CPython 3.9-3.13 and PyPy 3.11 only - python-package.yml: Update test matrix to match wheel builds - pyproject.toml: Require tokenizer>=3.6.0 (KLUDGY_ORDINALS removed) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 988bbab commit fdae1e7

File tree

3 files changed

+61
-8
lines changed

3 files changed

+61
-8
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
os: [ubuntu-latest]
16-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", '3.14.0-beta.4', "pypy-3.9", "pypy-3.10", "pypy-3.11"]
16+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "pypy-3.11"]
1717

1818
steps:
1919
- uses: actions/checkout@v4

.github/workflows/wheels.yml

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,22 @@ on:
66
- '**'
77

88
jobs:
9+
# Build wheels on each platform
910
build_wheels:
1011
name: Build wheels on ${{ matrix.os }}
1112
runs-on: ${{ matrix.os }}
1213
strategy:
1314
matrix:
14-
os: [macos-14, ubuntu-latest, windows-latest]
15+
os: [ubuntu-latest, macos-14, windows-latest]
1516

1617
steps:
17-
# Check out repository using git-lfs
1818
- uses: actions/checkout@v4
1919
with:
2020
lfs: true
2121

22-
# Python used to run cibuildwheel
2322
- uses: actions/setup-python@v5
2423
with:
25-
python-version: '3.10'
24+
python-version: '3.11'
2625

2726
- name: Install cibuildwheel
2827
run: python -m pip install --upgrade pip wheel setuptools cibuildwheel
@@ -31,15 +30,69 @@ jobs:
3130
run: python -m cibuildwheel --output-dir wheelhouse
3231
# Options (https://cibuildwheel.readthedocs.io/en/stable/options/)
3332
env:
34-
CIBW_SKIP: cp36-* cp37-* cp38-* *pp37-* pp38-* *musllinux* pp*-win*
33+
# Build for CPython 3.9-3.13 and PyPy 3.11
34+
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-* pp311-*
35+
CIBW_SKIP: "*musllinux*"
36+
CIBW_ENABLE: pypy
37+
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9"
3538
CIBW_BEFORE_BUILD_MACOS: python3 -m pip install --upgrade setuptools wheel cffi
3639
CIBW_ARCHS_MACOS: "x86_64 arm64"
3740
CIBW_ARCHS_WINDOWS: "AMD64"
3841
CIBW_ARCHS_LINUX: "x86_64"
3942
CIBW_BUILD_FRONTEND: "build"
40-
# CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9"
4143

4244
- uses: actions/upload-artifact@v4
4345
with:
4446
name: dist-${{ matrix.os }}
4547
path: ./wheelhouse/*.whl
48+
49+
# Build source distribution
50+
build_sdist:
51+
name: Build source distribution
52+
runs-on: ubuntu-latest
53+
54+
steps:
55+
- uses: actions/checkout@v4
56+
with:
57+
lfs: true
58+
59+
- uses: actions/setup-python@v5
60+
with:
61+
python-version: '3.11'
62+
63+
- name: Build sdist
64+
run: |
65+
python -m pip install build
66+
python -m build --sdist
67+
68+
- uses: actions/upload-artifact@v4
69+
with:
70+
name: dist-sdist
71+
path: dist/*.tar.gz
72+
73+
# Publish to PyPI (only for version tags)
74+
publish:
75+
name: Publish to PyPI
76+
needs: [build_wheels, build_sdist]
77+
runs-on: ubuntu-latest
78+
# Only publish on version tags (e.g., 3.5.9), skip test tags
79+
if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'test')
80+
environment:
81+
name: pypi
82+
url: https://pypi.org/project/reynir/
83+
permissions:
84+
id-token: write
85+
86+
steps:
87+
- name: Download all artifacts
88+
uses: actions/download-artifact@v4
89+
with:
90+
path: dist/
91+
pattern: dist-*
92+
merge-multiple: true
93+
94+
- name: List distributions
95+
run: ls -lh dist/
96+
97+
- name: Publish to PyPI
98+
uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ classifiers = [
3939
requires-python = ">=3.9"
4040
dependencies = [
4141
"cffi>=1.17.1",
42-
"tokenizer>=3.5.1",
42+
"tokenizer>=3.6.0",
4343
"islenska>=1.0.4",
4444
"typing_extensions",
4545
]

0 commit comments

Comments
 (0)