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
15 changes: 13 additions & 2 deletions .github/workflows/pytest-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
Expand All @@ -24,18 +24,29 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Install Rust (stable)
run:
curl https://sh.rustup.rs -sSf | sh -s -- -y

- name: Install dependencies
- name: Install dependencies (!= 3.14)
if: ${{ matrix.python-version != '3.14' }}
run: |
pip install --upgrade pip
pip install setuptools-rust pytest pydicom coverage pytest-cov
pip install git+https://github.com/pydicom/pylibjpeg-data
pip install -e .

- name: Install dependencies (== 3.14)
if: ${{ matrix.python-version == '3.14' }}
run: |
pip install --upgrade pip
pip install setuptools-rust pytest coverage pytest-cov
pip install git+https://github.com/pydicom/pylibjpeg-data
pip install git+https://github.com/pydicom/pydicom
pip install -e .

- name: Test with pytest
env:
PYTHON_VERSION: ${{ matrix.python-version }}
Expand Down
123 changes: 71 additions & 52 deletions .github/workflows/release-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ jobs:
- os: windows-latest
python: 313
platform_id: win32
- os: windows-latest
python: 314
platform_id: win32

# Windows 64 bit
- os: windows-latest
Expand All @@ -72,6 +75,9 @@ jobs:
- os: windows-latest
python: 313
platform_id: win_amd64
- os: windows-latest
python: 314
platform_id: win_amd64

# Linux 64 bit manylinux2014
- os: ubuntu-latest
Expand All @@ -90,6 +96,10 @@ jobs:
python: 313
platform_id: manylinux_x86_64
manylinux_image: manylinux2014
- os: ubuntu-latest
python: 314
platform_id: manylinux_x86_64
manylinux_image: manylinux2014

# Linux aarch64
- os: ubuntu-latest
Expand All @@ -104,6 +114,9 @@ jobs:
- os: ubuntu-latest
python: 313
platform_id: manylinux_aarch64
- os: ubuntu-latest
python: 314
platform_id: manylinux_aarch64

# MacOS x86_64
- os: macos-latest
Expand All @@ -118,6 +131,9 @@ jobs:
- os: macos-latest
python: 313
platform_id: macosx_x86_64
- os: macos-latest
python: 314
platform_id: macosx_x86_64

# MacOS arm64
- os: macos-latest
Expand All @@ -132,6 +148,9 @@ jobs:
- os: macos-latest
python: 313
platform_id: macosx_arm64
- os: macos-latest
python: 314
platform_id: macosx_arm64

steps:
- uses: actions/checkout@v5
Expand All @@ -157,7 +176,7 @@ jobs:
run: |
python -m pip install -U pip
python -m pip install -U setuptools-rust
python -m pip install cibuildwheel>=2.23
python -m pip install cibuildwheel>=3.1.3

- name: Build wheels
env:
Expand All @@ -179,63 +198,63 @@ jobs:
name: wheel-${{ matrix.python }}-${{ matrix.platform_id }}
path: ./dist

test-package:
name: Test built package
needs: [ build-wheels, build-sdist ]
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- name: Install Rust (stable)
run:
curl https://sh.rustup.rs -sSf | sh -s -- -y

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Download the wheels
uses: actions/download-artifact@v5
with:
path: dist/
merge-multiple: true

- name: Install from package wheels and test
run: |
python -m venv testwhl
source testwhl/bin/activate
python -m pip install -U pip
python -m pip install -U pytest pydicom pylibjpeg
python -m pip uninstall -y pylibjpeg-rle
python -m pip install git+https://github.com/pydicom/pylibjpeg-data
python -m pip install -U --pre --find-links dist/ pylibjpeg-rle
python -m pytest --pyargs rle.tests
deactivate

- name: Install from package tarball and test
run: |
python -m venv testsrc
source testsrc/bin/activate
python -m pip install -U pip
python -m pip install -U pytest pydicom pylibjpeg
python -m pip uninstall -y pylibjpeg-rle
python -m pip install git+https://github.com/pydicom/pylibjpeg-data
export PATH="$PATH:$HOME/.cargo/bin"
python -m pip install -U dist/pylibjpeg*rle-*.tar.gz
python -m pytest --pyargs rle.tests
deactivate
# test-package:
# name: Test built package
# needs: [ build-wheels, build-sdist ]
# runs-on: ubuntu-latest
# timeout-minutes: 30
# strategy:
# fail-fast: false
# matrix:
# python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
#
# steps:
# - name: Install Rust (stable)
# run:
# curl https://sh.rustup.rs -sSf | sh -s -- -y
#
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
#
# - name: Download the wheels
# uses: actions/download-artifact@v4
# with:
# path: dist/
# merge-multiple: true
#
# - name: Install from package wheels and test
# run: |
# python -m venv testwhl
# source testwhl/bin/activate
# python -m pip install -U pip
# python -m pip install -U pytest pydicom pylibjpeg
# python -m pip uninstall -y pylibjpeg-rle
# python -m pip install git+https://github.com/pydicom/pylibjpeg-data
# python -m pip install -U --pre --find-links dist/ pylibjpeg-rle
# python -m pytest --pyargs rle.tests
# deactivate
#
# - name: Install from package tarball and test
# run: |
# python -m venv testsrc
# source testsrc/bin/activate
# python -m pip install -U pip
# python -m pip install -U pytest pydicom pylibjpeg
# python -m pip uninstall -y pylibjpeg-rle
# python -m pip install git+https://github.com/pydicom/pylibjpeg-data
# export PATH="$PATH:$HOME/.cargo/bin"
# python -m pip install -U dist/pylibjpeg*rle-*.tar.gz
# python -m pytest --pyargs rle.tests
# deactivate

# The pypi upload fails with non-linux containers, so grab the uploaded
# artifacts and run using those
# See: https://github.com/pypa/gh-action-pypi-publish/discussions/15
deploy:
name: Upload wheels to PyPI
needs: [ test-package ]
needs: [ build-wheels ]
runs-on: ubuntu-latest
environment:
name: pypi
Expand Down
50 changes: 21 additions & 29 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pylibjpeg-rle"
version = "1.1.0"
version = "1.2.0"
authors = ["scaramallion <[email protected]>"]
edition = "2024"
exclude = [".github", "docs", ".codecov.yml", "asv.*", ".gitignore", ".coveragerc"]
Expand All @@ -11,4 +11,4 @@ crate-type = ["cdylib"]


[dependencies]
pyo3 = { version = "0.24.2", features = ["extension-module"] }
pyo3 = { version = "0.26.0", features = ["extension-module"] }
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2021 scaramallion
Copyright (c) 2020-2025 scaramallion

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading
Loading