From fe382395ceecbc7fdc9b90e5a179d249f2dbc382 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Sat, 7 Dec 2024 16:46:24 +0000 Subject: [PATCH] Build py3.13 wheel for pysam 0.22.1 Also: - Drop Python 3.8 support - Add Python 3.13 support --- .github/workflows/ci.yaml | 6 +++--- .github/workflows/lint.yaml | 2 +- pyproject.toml | 4 ++-- recipes/pysam/meta.yaml | 1 + wheel_builder.py | 1 + 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 784e71e..50026c8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,7 +1,7 @@ name: Build and upload wheels on: [push, pull_request] env: - CIBW_BUILD: 'cp38-* cp39-* cp310-* cp311-* cp312-*' + CIBW_BUILD: 'cp38-* cp39-* cp310-* cp311-* cp312-* cp313-*' CIBW_SKIP: '*-musllinux_*' concurrency: # Group runs by PR, but keep runs on the default branch separate @@ -74,7 +74,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - uses: actions/download-artifact@v4 with: name: recipe_list @@ -107,7 +107,7 @@ jobs: path: wheelhouse/ - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Setup deploy environment run: python3 -m pip install s3pypi - name: Deploy wheels diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 3145c20..b14ba83 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.12'] + python-version: ['3.9', '3.13'] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/pyproject.toml b/pyproject.toml index 2124f3c..f6477fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,13 @@ [tool.black] line-length = 120 -target-version = ['py38'] +target-version = ['py39'] include = '\.pyi?$' [tool.darker] isort = true [tool.ruff] -target-version = "py38" +target-version = "py39" [tool.ruff.lint] select = ["E", "F", "B", "UP"] diff --git a/recipes/pysam/meta.yaml b/recipes/pysam/meta.yaml index 4807960..c1877cc 100644 --- a/recipes/pysam/meta.yaml +++ b/recipes/pysam/meta.yaml @@ -1,4 +1,5 @@ --- + name: pysam version: 0.22.1 # as of 0.22.0 {project} in pyproject.toml [tool.cibuildwheel] expects to be the package dir diff --git a/wheel_builder.py b/wheel_builder.py index af2d629..9ed3f1b 100644 --- a/wheel_builder.py +++ b/wheel_builder.py @@ -69,6 +69,7 @@ if is_package_pure or run_in_sdist: tar_temp_dir = Path(tempfile.mkdtemp(dir=temp_dir)) with tarfile.open(sdist_filepath) as tar: + tar.extraction_filter = getattr(tarfile, "data_filter", (lambda member, path: member)) tar.extractall(path=tar_temp_dir) try: