diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index efb3970..b4f9aa8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,19 +17,19 @@ jobs: python-version: 3.12 architecture: x64 - uses: dtolnay/rust-toolchain@nightly - - name: Build wheels - x86_64 + - name: Build wheels uses: messense/maturin-action@v1 with: - target: x86_64 - args: --release --out dist --sdist + target: universal2-apple-darwin + args: --release --out dist sccache: true - - name: Build wheels - universal2 + - name: Build free-threaded wheels uses: messense/maturin-action@v1 with: target: universal2-apple-darwin - args: --release --out dist + args: --release --out dist -i python3.13t sccache: true - - name: Install built wheel - universal2 + - name: Install built wheel run: | pip install nh3 --no-index --find-links dist --force-reinstall pip install pytest @@ -57,6 +57,11 @@ jobs: with: target: ${{ matrix.target }} args: --release --out dist + - name: Build free-threaded wheels + uses: messense/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist -i python3.13t - name: Install built wheel run: | pip install nh3 --no-index --find-links dist --force-reinstall @@ -87,6 +92,14 @@ jobs: manylinux: auto args: --release --out dist sccache: true + - name: Build free-threaded wheels + uses: messense/maturin-action@v1 + with: + rust-toolchain: nightly + target: ${{ matrix.target }} + manylinux: auto + args: --release --out dist -i python3.13t + sccache: true - name: Install built wheel if: matrix.target == 'x86_64' run: | @@ -117,6 +130,14 @@ jobs: manylinux: auto args: --release --out dist sccache: true + - name: Build free-threaded wheels + uses: messense/maturin-action@v1 + with: + rust-toolchain: nightly + target: ${{ matrix.target }} + manylinux: auto + args: --release --out dist -i python3.13 + sccache: true - uses: uraimo/run-on-arch-action@v2.8.1 if: matrix.target != 'ppc64' name: Install built wheel @@ -157,6 +178,13 @@ jobs: manylinux: musllinux_1_2 args: --release --out dist sccache: true + - name: Build free-threaded wheels + uses: messense/maturin-action@v1 + with: + target: ${{ matrix.target }} + manylinux: musllinux_1_2 + args: --release --out dist -i python3.13t + sccache: true - name: Install built wheel if: matrix.target == 'x86_64-unknown-linux-musl' uses: addnab/docker-run-action@v3 @@ -197,6 +225,13 @@ jobs: manylinux: musllinux_1_2 args: --release --out dist sccache: true + - name: Build free-threaded wheels + uses: messense/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + manylinux: musllinux_1_2 + args: --release --out dist -i python3.13t + sccache: true - uses: uraimo/run-on-arch-action@v2.8.1 name: Install built wheel with: diff --git a/.readthedocs.yml b/.readthedocs.yml index ef69a0c..ff14310 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -9,7 +9,7 @@ build: os: "ubuntu-22.04" tools: python: "3.12" - rust: "1.70" + rust: "1.82" python: install: diff --git a/Cargo.lock b/Cargo.lock index 8a404cb..6cf264c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -33,6 +33,15 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "cc" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" +dependencies = [ + "shlex", +] + [[package]] name = "cfg-if" version = "1.0.0" @@ -469,6 +478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3015cf985888fe66cfb63ce0e321c603706cd541b7aec7ddd35c281390af45d8" dependencies = [ "once_cell", + "python3-dll-a", "target-lexicon", ] @@ -507,6 +517,15 @@ dependencies = [ "syn", ] +[[package]] +name = "python3-dll-a" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0b78171a90d808b319acfad166c4790d9e9759bbc14ac8273fe133673dd41b" +dependencies = [ + "cc", +] + [[package]] name = "quote" version = "1.0.37" @@ -581,6 +600,12 @@ dependencies = [ "syn", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "siphasher" version = "0.3.11" diff --git a/Cargo.toml b/Cargo.toml index 2366598..6df1ef2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,4 +15,4 @@ crate-type = ["cdylib"] [dependencies] ammonia = "4.0.0" -pyo3 = { version = "0.23.2", features = ["abi3-py38"] } +pyo3 = { version = "0.23.2", features = ["abi3-py38", "generate-import-lib"] }