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
69 changes: 53 additions & 16 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ jobs:
shell: bash
run: |
set -e
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
python3 -m venv .venv
source .venv/bin/activate
pip install pycrc32 --find-links dist --force-reinstall
pip install pytest
uv pip install pycrc32 --find-links dist --force-reinstall
uv pip install pytest
pytest
- name: pytest
if: ${{ !startsWith(matrix.platform.target, 'x86') && matrix.platform.target != 'ppc64' }}
Expand All @@ -72,11 +74,14 @@ jobs:
githubToken: ${{ github.token }}
install: |
apt-get update
apt-get install -y --no-install-recommends python3 python3-pip
pip3 install -U pip pytest
apt-get install -y --no-install-recommends python3 python3-pip curl
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
uv pip install --system pytest
run: |
set -e
pip3 install pycrc32 --find-links dist --force-reinstall
export PATH="$HOME/.local/bin:$PATH"
uv pip install --system pycrc32 --find-links dist --force-reinstall
pytest

musllinux:
Expand Down Expand Up @@ -117,11 +122,13 @@ jobs:
options: -v ${{ github.workspace }}:/io -w /io
run: |
set -e
apk add py3-pip py3-virtualenv
apk add py3-pip py3-virtualenv curl
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
python3 -m virtualenv .venv
source .venv/bin/activate
pip install pycrc32 --no-index --find-links dist --force-reinstall
pip install pytest
uv pip install pycrc32 --no-index --find-links dist --force-reinstall
uv pip install pytest
pytest
- name: pytest
if: ${{ !startsWith(matrix.platform.target, 'x86') }}
Expand All @@ -131,13 +138,15 @@ jobs:
distro: alpine_latest
githubToken: ${{ github.token }}
install: |
apk add py3-virtualenv
apk add py3-virtualenv curl
curl -LsSf https://astral.sh/uv/install.sh | sh
run: |
set -e
export PATH="$HOME/.local/bin:$PATH"
python3 -m virtualenv .venv
source .venv/bin/activate
pip install pytest
pip install pycrc32 --find-links dist --force-reinstall
uv pip install pytest
uv pip install pycrc32 --find-links dist --force-reinstall
pytest

windows:
Expand Down Expand Up @@ -171,10 +180,12 @@ jobs:
shell: bash
run: |
set -e
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
python3 -m venv .venv
source .venv/Scripts/activate
pip install pycrc32 --find-links dist --force-reinstall
pip install pytest
uv pip install pycrc32 --find-links dist --force-reinstall
uv pip install pytest
pytest

macos:
Expand Down Expand Up @@ -205,10 +216,12 @@ jobs:
- name: pytest
run: |
set -e
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
python3 -m venv .venv
source .venv/bin/activate
pip install pycrc32 --find-links dist --force-reinstall
pip install pytest
uv pip install pycrc32 --find-links dist --force-reinstall
uv pip install pytest
pytest

sdist:
Expand All @@ -226,11 +239,35 @@ jobs:
name: wheels-sdist
path: dist

test-python-versions:
name: Test Python versions
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Build and test
run: |
uv tool install maturin
python -m venv .venv
source .venv/bin/activate
maturin develop
uv pip install pytest
pytest

release:
name: Release
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [linux, musllinux, windows, macos, sdist]
needs: [linux, musllinux, windows, macos, sdist, test-python-versions]
permissions:
# Use to sign the release artifacts
id-token: write
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ docs/_build/

# Pyenv
.python-version

CLAUDE.md
GEMINI.md
65 changes: 32 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ crate-type = ["cdylib"]

[dependencies]
crc32fast = "1.4.2"
pyo3 = "0.24.0"
pyo3 = "0.25.1"

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pycrc32
![PyPI - Version](https://img.shields.io/pypi/v/pycrc32)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pycrc32)
![Python Version](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)
![PyPI - License](https://img.shields.io/pypi/l/pycrc32)
![PyPI - Downloads](https://img.shields.io/pypi/dm/pycrc32)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Homepage = "https://github.com/code-inflation/pycrc32"
Repository = "https://github.com/code-inflation/pycrc32"

[build-system]
requires = ["maturin>=1.4,<2.0"]
requires = ["maturin>=1.9,<2.0"]
build-backend = "maturin"

[tool.maturin]
Expand Down
7 changes: 7 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.