From 0072046e0e81eeeffab39f50032e3c4f7f4a5b32 Mon Sep 17 00:00:00 2001 From: messense Date: Sun, 7 May 2023 17:41:53 +0800 Subject: [PATCH 1/2] Test `--find-interpreter` on CI --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 150d33f5f..1b68daaa6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -415,6 +415,9 @@ jobs: # Test abi3 cargo run --target x86_64-unknown-linux-gnu -- build -i ${{ matrix.platform.python }} --release --out dist --target ${{ matrix.platform.target }} -m test-crates/pyo3-pure/Cargo.toml + # --find-interpreter + cargo run --target x86_64-unknown-linux-gnu -- build --find-interpreter --release --out dist --target ${{ matrix.platform.target }} -m test-crates/pyo3-mixed/Cargo.toml + test-bootstrap: name: Test Bootstrap runs-on: ${{ matrix.os }} From 4cca6b9e681e0859273b4a3b8f327ba51c4725af Mon Sep 17 00:00:00 2001 From: messense Date: Sun, 7 May 2023 17:54:36 +0800 Subject: [PATCH 2/2] Fix finding interpreters from bundled sysconfigs --- Changelog.md | 2 ++ src/python_interpreter/mod.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index a517238b4..ed8f0984c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +* Fix finding interpreters from bundled sysconfigs in [#1598](https://github.com/PyO3/maturin/pull/1598) + ## [0.15.0] - 2023-05-07 * **Breaking Change**: Build with `--no-default-features` by default when bootstrapping from sdist in [#1333](https://github.com/PyO3/maturin/pull/1333) diff --git a/src/python_interpreter/mod.rs b/src/python_interpreter/mod.rs index 71ed59e20..7d335b4f5 100644 --- a/src/python_interpreter/mod.rs +++ b/src/python_interpreter/mod.rs @@ -704,7 +704,7 @@ impl PythonInterpreter { .filter_map(|config| match requires_python { Some(requires_python) => { if requires_python - .contains(&Version::from_release(vec![config.major, config.major])) + .contains(&Version::from_release(vec![config.major, config.minor])) { Some(Self::from_config(config)) } else {