Skip to content

Commit 39a39e5

Browse files
CI: Fix PyPy 3.11 build by avoiding mypy dependency
Install only test dependencies (pytest) on non-3.9 Python versions, since mypy's librt dependency doesn't work on PyPy 3.11. The dev dependencies (including mypy) are only needed for type checking on 3.9. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f9bb989 commit 39a39e5

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ jobs:
2929
run: |
3030
python -m pip install --upgrade uv
3131
uv pip install --system --upgrade wheel setuptools
32-
uv pip install --system ".[dev]"
32+
if [ "${{ matrix.python-version }}" == "3.9" ]; then
33+
uv pip install --system ".[dev]"
34+
else
35+
uv pip install --system ".[test]"
36+
fi
3337
3438
- name: Type check with mypy (only on oldest supported Python version)
3539
run: |
36-
if [ "${{ matrix.python-version }}" == "3.9" ]; then python -m pip install mypy; fi
3740
if [ "${{ matrix.python-version }}" == "3.9" ]; then mypy --python-version=3.9 src/tokenizer; fi
3841
3942
- name: Test with pytest

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ Issues = "https://github.com/mideind/Tokenizer/issues"
5353
Changelog = "https://github.com/mideind/Tokenizer#changelog"
5454

5555
[project.optional-dependencies]
56+
test = [
57+
"pytest>=7.0",
58+
]
5659
dev = [
5760
"pytest>=7.0",
5861
"pytest-cov>=4.0",

0 commit comments

Comments
 (0)