From 0eef2b3c3c1a47b0f729211df5f2df3f3fc4bd41 Mon Sep 17 00:00:00 2001 From: wenming21 Date: Fri, 14 Nov 2025 23:14:06 +0800 Subject: [PATCH 1/2] Add Python package version number --- Cargo.lock | 176 ++++++++++++++++++++++++++++--------------------- Cargo.toml | 7 +- pyproject.toml | 2 +- src/lib.rs | 16 ++--- 4 files changed, 116 insertions(+), 85 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7831154..6c36b83 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 4 [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "block-buffer" @@ -28,9 +28,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.39" +version = "1.2.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1354349954c6fc9cb0deab020f27f783cf0b604e8bb754dc4658ecf0d29c35f" +checksum = "b97463e1064cb1b1c1384ad0a0b9c8abd0988e2a91f52606c80ef14aadb63e36" dependencies = [ "find-msvc-tools", "shlex", @@ -38,24 +38,24 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] [[package]] name = "crypto-common" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", "typenum", @@ -73,9 +73,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" [[package]] name = "generic-array" @@ -95,15 +95,18 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "indoc" -version = "2.0.4" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" +checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" +dependencies = [ + "rustversion", +] [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jsonpath-rust" @@ -131,9 +134,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.149" +version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libmimalloc-sys" @@ -147,15 +150,15 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "memoffset" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] @@ -177,20 +180,19 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "pest" -version = "2.8.0" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198db74531d58c70a361c42201efde7e2591e976d518caf7662a47dc5720e7b6" +checksum = "989e7521a040efde50c3ab6bbadafbe15ab6dc042686926be59ac35d74607df4" dependencies = [ "memchr", - "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.8.0" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d725d9cfd79e87dccc9341a2ef39d1b6f6353d68c4b33c177febbe1a402c97c5" +checksum = "187da9a3030dbafabbbfb20cb323b976dc7b7ce91fcd84f2f74d6e31d378e2de" dependencies = [ "pest", "pest_generator", @@ -198,9 +200,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.8.0" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db7d01726be8ab66ab32f9df467ae8b1148906685bbe75c82d1e65d7f5b3f841" +checksum = "49b401d98f5757ebe97a26085998d6c0eecec4995cad6ab7fc30ffdf4b052843" dependencies = [ "pest", "pest_meta", @@ -211,26 +213,25 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.8.0" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9f832470494906d1fca5329f8ab5791cc60beb230c74815dff541cbd2b5ca0" +checksum = "72f27a2cfee9f9039c4d86faa5af122a0ac3851441a34865b8a043b46be0065a" dependencies = [ - "once_cell", "pest", "sha2", ] [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ "unicode-ident", ] @@ -258,6 +259,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fc6ddaf24947d12a9aa31ac65431fb1b851b8f4365426e182901eabfb87df5f" dependencies = [ + "python3-dll-a", "target-lexicon", ] @@ -296,6 +298,15 @@ dependencies = [ "syn", ] +[[package]] +name = "python3-dll-a" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d381ef313ae70b4da5f95f8a4de773c6aa5cd28f73adec4b4a31df70b66780d8" +dependencies = [ + "cc", +] + [[package]] name = "pythonize" version = "0.26.0" @@ -308,18 +319,18 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.40" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] [[package]] name = "regex" -version = "1.10.2" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -329,9 +340,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -340,30 +351,45 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" + +[[package]] +name = "rustversion" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "serde" -version = "1.0.190" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", @@ -372,20 +398,22 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", + "memchr", "ryu", "serde", + "serde_core", ] [[package]] name = "sha2" -version = "0.10.8" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", @@ -400,9 +428,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "syn" -version = "2.0.101" +version = "2.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea" dependencies = [ "proc-macro2", "quote", @@ -411,24 +439,24 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" +checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c" [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", @@ -437,30 +465,30 @@ dependencies = [ [[package]] name = "typenum" -version = "1.17.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "unindent" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" +checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" diff --git a/Cargo.toml b/Cargo.toml index 4655a59..3a0160a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,10 +20,13 @@ opt-level = 1 debug = true [dependencies] -pyo3 = { version = "0.26.0", features = ["extension-module"] } +pyo3 = { version = "0.26.0", features = [ + "extension-module", + "generate-import-lib", +] } jsonpath-rust = "1.0.4" serde_json = "1.0" pythonize = "0.26.0" -[target.'cfg(any(not(target_os = "linux"),all(target_os = "linux", target_env = "musl")))'.dependencies] +[target.'cfg(any(not(target_os = "linux"),all(target_os = "linux", target_env = "musl"),all(target_os = "linux", target_arch = "x86_64", not(target_env = "musl")),all(target_os = "linux", target_arch = "x86", not(target_env = "musl"))))'.dependencies] mimalloc = "0.1.48" diff --git a/pyproject.toml b/pyproject.toml index d49d926..7f81bbf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["maturin>=1.9.4,<2.0"] +requires = ["maturin>=1.10.0,<2.0"] build-backend = "maturin" [project] diff --git a/src/lib.rs b/src/lib.rs index 31b3eb1..e001496 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,22 +8,21 @@ use serde_json::Value; #[cfg(any( not(target_os = "linux"), - all(target_os = "linux", target_env = "musl") + all(target_os = "linux", target_env = "musl"), + all(target_os = "linux", target_arch = "x86_64", not(target_env = "musl")), + all(target_os = "linux", target_arch = "x86", not(target_env = "musl")) ))] use mimalloc::MiMalloc; #[cfg(any( not(target_os = "linux"), - all(target_os = "linux", target_env = "musl") + all(target_os = "linux", target_env = "musl"), + all(target_os = "linux", target_arch = "x86_64", not(target_env = "musl")), + all(target_os = "linux", target_arch = "x86", not(target_env = "musl")) ))] #[global_allocator] static GLOBAL: MiMalloc = MiMalloc; -#[cfg(all(target_os = "linux", not(target_env = "musl")))] -use std::alloc::System; -#[cfg(all(target_os = "linux", not(target_env = "musl")))] -#[global_allocator] -static GLOBAL: System = System; - +const PYTHON_PACKAGE_VERSION: &str = env!("CARGO_PKG_VERSION"); // JSONPath query result containing found data and path #[pyclass(frozen)] struct JsonPathResult { @@ -158,5 +157,6 @@ fn repr_json_path_result(slf: PyRef<'_, JsonPathResult>) -> PyResult { fn jsonpath_rust_bindings(m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_class::()?; m.add_class::()?; + m.add("__version__", PYTHON_PACKAGE_VERSION)?; Ok(()) } From 077390fa92bfe54fdb261bf7ce3d4349d9ab4db2 Mon Sep 17 00:00:00 2001 From: wenming21 Date: Fri, 14 Nov 2025 23:15:52 +0800 Subject: [PATCH 2/2] Add support for Windows arm64 --- .github/workflows/CI.yml | 144 ++++++++++++++++++++++++++------------- 1 file changed, 96 insertions(+), 48 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 98e5171..a903301 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -28,22 +28,9 @@ jobs: # These jobs will set up the Python environments for the other jobs to use. setup-python-linux: name: Setup Python Environments (Linux) - runs-on: ${{ matrix.platform.runner }} + runs-on: ubuntu-latest strategy: matrix: - platform: - - runner: ubuntu-latest - target: x86_64 - - runner: ubuntu-latest - target: x86 - - runner: ubuntu-latest - target: aarch64 - - runner: ubuntu-latest - target: armv7 - - runner: ubuntu-latest - target: s390x - - runner: ubuntu-latest - target: ppc64le python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.9", "pypy3.10", "pypy3.11" ] steps: - uses: actions/checkout@v5 @@ -53,35 +40,56 @@ jobs: python-version: ${{ matrix.python-version }} allow-prereleases: true - setup-python-windows: - name: Setup Python Environments (Windows) - runs-on: ${{ matrix.platform.runner }} + setup-python-windows-x64: + name: Setup Python Environments (Windows-x64) + runs-on: windows-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + steps: + - uses: actions/checkout@v5 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + allow-prereleases: true + + setup-python-windows-x86: + name: Setup Python Environments (Windows-x86) + runs-on: windows-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + steps: + - uses: actions/checkout@v5 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + architecture: x86 + allow-prereleases: true + + setup-python-windows-arm64: + name: Setup Python Environments (Windows-arm64) + runs-on: windows-11-arm strategy: matrix: - platform: - - runner: windows-latest - target: x64 # 64-bit Python interpreter, note that 32-bit Python interpreter is not supported on Windows x86 - # Other Python versions need to be installed separately to build correctly - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v5 - name: Set up Python uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - architecture: ${{ matrix.platform.target }} + architecture: arm64 allow-prereleases: true setup-python-macos: name: Setup Python Environments (macOS) - runs-on: ${{ matrix.platform.runner }} + runs-on: macos-latest strategy: matrix: - platform: - - runner: macos-latest - target: x86_64 - - runner: macos-latest - target: aarch64 python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.9", "pypy3.10", "pypy3.11" ] steps: - uses: actions/checkout@v5 @@ -145,14 +153,9 @@ jobs: name: wheels-musllinux-${{ matrix.target }} path: target/wheels - windows: - runs-on: ${{ matrix.platform.runner }} - needs: setup-python-windows - strategy: - matrix: - platform: - - runner: windows-latest - target: x64 + windows-x64: + runs-on: windows-latest + needs: setup-python-windows-x64 steps: - uses: actions/checkout@v5 @@ -161,11 +164,10 @@ jobs: with: python-version: | 3.8 - 3.14 pypy3.9 pypy3.10 pypy3.11 - architecture: ${{ matrix.platform.target }} + architecture: x64 allow-prereleases: true - name: Set PyPy paths @@ -193,7 +195,7 @@ jobs: - name: Build wheels for all Python versions uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.platform.target }} + target: x64 args: | --release --out target/wheels @@ -205,20 +207,66 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels-windows-${{ matrix.platform.target }} + name: wheels-windows-x64 path: target/wheels + windows-x86: + needs: setup-python-windows-x86 + runs-on: windows-latest + steps: + - uses: actions/checkout@v5 + + - name: Install Python3.8 + uses: actions/setup-python@v6 + with: + python-version: 3.8 + architecture: x86 + allow-prereleases: true + - name: Build wheels for all Python versions + uses: PyO3/maturin-action@v1 + with: + target: x86 + args: | + --release + --out target/wheels + -i python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 python3.14 + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} + + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: wheels-windows-x86 + path: target/wheels + + windows-arm64: + runs-on: windows-11-arm + needs: setup-python-windows-arm64 + steps: + - uses: actions/checkout@v5 + - name: Build wheels for all Python versions + uses: PyO3/maturin-action@v1 + with: + target: aarch64-pc-windows-msvc + args: | + --release + --out target/wheels + -i python3.11 python3.12 python3.13 python3.14 + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} + + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: wheels-windows-arm64 + path: target/wheels + + macos: - runs-on: ${{ matrix.runner }} + runs-on: macos-latest needs: setup-python-macos strategy: matrix: - include: - - runner: macos-latest - target: x86_64 - - runner: macos-latest - target: aarch64 + target: [x86_64, aarch64] steps: - uses: actions/checkout@v5 @@ -257,7 +305,7 @@ jobs: 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-x64, windows-x86, windows-arm64, macos, sdist] permissions: # Use to sign the release artifacts id-token: write