Skip to content

Commit fee6cb7

Browse files
authored
Merge pull request #21 from ncoish/support-py3.13
Update pyo3 and numpy crate versions to support python 3.13
2 parents 6db4fcf + 888e09f commit fee6cb7

4 files changed

Lines changed: 40 additions & 35 deletions

File tree

.github/workflows/test_and_deploy.yml

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@ on:
99
pull_request:
1010
release:
1111
types:
12-
- published
12+
- published
1313

14+
env:
15+
MATURIN_VERSION: "1.8"
1416

1517
jobs:
1618
wheels:
1719
name: "Build & test wheel"
1820
strategy:
1921
matrix:
2022
# Support both Mac x86_64 and arm64
21-
os: [ubuntu-latest, windows-latest, macos-12, macos-latest]
22-
py-version: ["3.10", "3.11", "3.12"]
23+
os: [ubuntu-latest, windows-latest, macos-latest]
24+
py-version: ["3.10", "3.11", "3.12", "3.13"]
2325
runs-on: ${{ matrix.os }}
2426
defaults:
2527
run:
@@ -32,21 +34,21 @@ jobs:
3234
- name: Install Rust toolchain
3335
uses: actions-rs/toolchain@v1
3436
with:
35-
toolchain: stable
36-
override: true
37+
toolchain: stable
38+
override: true
3739
- name: Install dependencies
38-
run: pip install "maturin==1.4" "oldest-supported-numpy" pytest
40+
run: pip install "maturin==$MATURIN_VERSION" "oldest-supported-numpy" pytest
3941
- name: Build wheel
4042
run: maturin build --release -i python -o dist
4143
- name: Install wheel
4244
run: pip install .//dist//*.whl
4345
- name: Test wheel
4446
run: pytest --assert=plain tests
45-
- uses: actions/upload-artifact@v3
47+
- uses: actions/upload-artifact@v4
4648
with:
49+
name: artifact-wheel-${{ matrix.os }}-${{ matrix.py-version }}
4750
path: .//dist//*.whl
4851

49-
5052
sdist:
5153
name: Build & test source distribution
5254
runs-on: ubuntu-latest
@@ -57,17 +59,18 @@ jobs:
5759
- uses: actions/checkout@v3
5860
- uses: actions/setup-python@v3
5961
with:
60-
python-version: "3.12"
62+
python-version: "3.13"
6163
- name: Install dependencies
62-
run: pip install "maturin==1.4" pytest
64+
run: pip install "maturin==$MATURIN_VERSION" pytest
6365
- name: Build source distribution
6466
run: maturin sdist -o dist
6567
- name: Install source distribution
6668
run: pip install .//dist//*.tar.gz
6769
- name: Test source distribution
6870
run: pytest --assert=plain tests
69-
- uses: actions/upload-artifact@v3
71+
- uses: actions/upload-artifact@v4
7072
with:
73+
name: artifact-tar-${{ matrix.os }}-${{ matrix.py-version }}
7174
path: dist//*.tar.gz
7275

7376
benchmarks:
@@ -77,7 +80,7 @@ jobs:
7780
- uses: actions/checkout@v3
7881
- uses: actions/setup-python@v3
7982
with:
80-
python-version: "3.12"
83+
python-version: "3.13"
8184
- name: Install dependencies
8285
run: pip install .[test]
8386
- name: Run benchmarks
@@ -92,19 +95,21 @@ jobs:
9295
needs: [wheels, sdist, benchmarks]
9396
runs-on: ubuntu-latest
9497
steps:
95-
- uses: actions/download-artifact@v3
96-
with:
97-
name: artifact
98-
path: dist
99-
- name: List distributions to be uploaded
100-
run: ls dist
101-
- name: Upload to GitHub Releases
102-
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
103-
if: github.event_name == 'release' && github.event.action == 'published'
104-
with:
105-
files: dist//*
106-
- name: Upload to PyPI
107-
uses: pypa/gh-action-pypi-publish@c7f29f7adef1a245bd91520e94867e5c6eedddcc
108-
if: github.event_name == 'release' && github.event.action == 'published'
109-
with:
110-
password: ${{ secrets.PYPI_TOKEN }}
98+
- name: Download Artifacts
99+
uses: actions/download-artifact@v4
100+
with:
101+
pattern: artifact-*
102+
merge-multiple: true
103+
path: dist
104+
- name: List distributions to be uploaded
105+
run: ls dist
106+
- name: Upload to GitHub Releases
107+
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
108+
if: github.event_name == 'release' && github.event.action == 'published'
109+
with:
110+
files: dist//*
111+
- name: Upload to PyPI
112+
uses: pypa/gh-action-pypi-publish@c7f29f7adef1a245bd91520e94867e5c6eedddcc
113+
if: github.event_name == 'release' && github.event.action == 'published'
114+
with:
115+
password: ${{ secrets.PYPI_TOKEN }}

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[package]
22
name = "fastpdb"
3-
version = "1.3.1"
3+
version = "1.3.2"
44
edition = "2018"
55

66
[dependencies]
7-
numpy = "0.21"
7+
numpy = "0.24"
88
ndarray = "0.16"
99

1010
[dependencies.pyo3]
11-
version = "0.21"
11+
version = "0.24"
1212
features = ["extension-module"]
1313

1414
[lib]
1515
name = "fastpdb"
16-
crate-type = ["cdylib"]
16+
crate-type = ["cdylib"]

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "fastpdb"
3-
version = "1.3.1"
3+
version = "1.3.2"
44
description = "A high performance drop-in replacement for Biotite's PDBFile."
55
readme = "README.rst"
66
requires-python = ">=3.7"
@@ -49,6 +49,6 @@ python-source = "python-src"
4949
[build-system]
5050
requires = [
5151
"maturin >=1.0,<2.0",
52-
"numpy == 1.26"
52+
"numpy >=1.26,<1.27"
5353
]
5454
build-backend = "maturin"

python-src/fastpdb/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
__name__ = "fastpdb"
22
__author__ = "Patrick Kunzmann"
33
__all__ = ["PDBFile"]
4-
__version__ = "1.3.1"
4+
__version__ = "1.3.2"
55

66
import os
77
import warnings

0 commit comments

Comments
 (0)