Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-maturin for openSUSE:Factory 
checked in at 2025-10-11 22:48:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-maturin (Old)
 and      /work/SRC/openSUSE:Factory/.python-maturin.new.5300 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-maturin"

Sat Oct 11 22:48:06 2025 rev:55 rq:1310403 version:1.9.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-maturin/python-maturin.changes    
2025-10-08 18:13:19.703400366 +0200
+++ /work/SRC/openSUSE:Factory/.python-maturin.new.5300/python-maturin.changes  
2025-10-11 22:48:08.836012529 +0200
@@ -1,0 +2,13 @@
+Thu Oct  9 21:38:44 UTC 2025 - Mia Herkt <[email protected]>
+
+- Update to 1.9.6
+  * Trim platform details on Windows detection
+    gh#PyO3/maturin#2755
+  * Bump actions/setup-python from 5 to 6
+    gh#PyO3/maturin#2748
+  * Bump actions/setup-node from 4 to 5
+    gh#PyO3/maturin#2749
+  * make PythonInterpreter::check_executable aware of windows arch
+    gh#PyO3/maturin#2758
+
+-------------------------------------------------------------------

Old:
----
  maturin-1.9.5.tar.gz

New:
----
  maturin-1.9.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-maturin.spec ++++++
--- /var/tmp/diff_new_pack.9p0bpv/_old  2025-10-11 22:48:12.408161734 +0200
+++ /var/tmp/diff_new_pack.9p0bpv/_new  2025-10-11 22:48:12.420162235 +0200
@@ -23,7 +23,7 @@
 %endif
 %{?sle15_python_module_pythons}
 Name:           python-maturin
-Version:        1.9.5
+Version:        1.9.6
 Release:        0
 Summary:        Rust/Python Interoperability
 License:        Apache-2.0 OR MIT

++++++ maturin-1.9.5.tar.gz -> maturin-1.9.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/maturin-1.9.5/.pre-commit-config.yaml 
new/maturin-1.9.6/.pre-commit-config.yaml
--- old/maturin-1.9.5/.pre-commit-config.yaml   2025-10-04 08:40:55.000000000 
+0200
+++ new/maturin-1.9.6/.pre-commit-config.yaml   2025-10-07 14:34:28.000000000 
+0200
@@ -56,12 +56,12 @@
           )
       - id: mixed-line-ending
   - repo: https://github.com/astral-sh/ruff-pre-commit
-    rev: v0.13.0
+    rev: v0.13.3
     hooks:
       - id: ruff-format
       - id: ruff
   - repo: https://github.com/pre-commit/mirrors-mypy
-    rev: v1.18.1
+    rev: v1.18.2
     hooks:
       - id: mypy
         entry: mypy maturin/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/maturin-1.9.5/Cargo.lock new/maturin-1.9.6/Cargo.lock
--- old/maturin-1.9.5/Cargo.lock        2025-10-04 08:40:55.000000000 +0200
+++ new/maturin-1.9.6/Cargo.lock        2025-10-07 14:34:28.000000000 +0200
@@ -1455,7 +1455,7 @@
 
 [[package]]
 name = "maturin"
-version = "1.9.5"
+version = "1.9.6"
 dependencies = [
  "anyhow",
  "base64 0.21.7",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/maturin-1.9.5/Cargo.toml new/maturin-1.9.6/Cargo.toml
--- old/maturin-1.9.5/Cargo.toml        1970-01-01 01:00:00.000000000 +0100
+++ new/maturin-1.9.6/Cargo.toml        1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +1,7 @@
 [package]
 authors = ["konstin <[email protected]>", "messense <[email protected]>"]
 name = "maturin"
-version = "1.9.5"
+version = "1.9.6"
 description = "Build and publish crates with pyo3, cffi and uniffi bindings as 
well as rust binaries as python packages"
 exclude = [
     "test-crates/**/*",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/maturin-1.9.5/Changelog.md 
new/maturin-1.9.6/Changelog.md
--- old/maturin-1.9.5/Changelog.md      2025-10-04 08:40:55.000000000 +0200
+++ new/maturin-1.9.6/Changelog.md      2025-10-07 14:34:28.000000000 +0200
@@ -1,5 +1,10 @@
 # Changelog
 
+## [1.9.6]
+
+* Fix regressions to interpreter platform detection on Windows from 1.9.5
+* Further fixes to interpreter detection for Windows ARM64
+
 ## [1.9.5]
 
 * Add builtin sysconfig for FreeBSD 14.2 amd64
@@ -1104,7 +1109,8 @@
 
  * Initial Release
 
-[Unreleased]: https://github.com/pyo3/maturin/compare/v1.9.5...HEAD
+[Unreleased]: https://github.com/pyo3/maturin/compare/v1.9.6...HEAD
+[1.9.6]: https://github.com/pyo3/maturin/compare/v1.9.5...v1.9.6
 [1.9.5]: https://github.com/pyo3/maturin/compare/v1.9.4...v1.9.5
 [1.9.4]: https://github.com/pyo3/maturin/compare/v1.9.3...v1.9.4
 [1.9.3]: https://github.com/pyo3/maturin/compare/v1.9.2...v1.9.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/maturin-1.9.5/PKG-INFO new/maturin-1.9.6/PKG-INFO
--- old/maturin-1.9.5/PKG-INFO  1970-01-01 01:00:00.000000000 +0100
+++ new/maturin-1.9.6/PKG-INFO  1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: maturin
-Version: 1.9.5
+Version: 1.9.6
 Classifier: Topic :: Software Development :: Build Tools
 Classifier: Programming Language :: Rust
 Classifier: Programming Language :: Python :: Implementation :: CPython
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/maturin-1.9.5/src/build_options.rs 
new/maturin-1.9.6/src/build_options.rs
--- old/maturin-1.9.5/src/build_options.rs      2025-10-04 08:40:55.000000000 
+0200
+++ new/maturin-1.9.6/src/build_options.rs      2025-10-07 14:34:28.000000000 
+0200
@@ -374,8 +374,13 @@
                                 }
                             }
                         } else {
-                            interpreters =
-                                find_interpreter(bridge, interpreter, target, 
requires_python)?;
+                            interpreters = find_interpreter(
+                                bridge,
+                                interpreter,
+                                target,
+                                requires_python,
+                                generate_import_lib,
+                            )?;
                         }
 
                         let interpreters_str = interpreters
@@ -1288,6 +1293,7 @@
     interpreter: &[PathBuf],
     target: &Target,
     requires_python: Option<&VersionSpecifiers>,
+    generate_import_lib: bool,
 ) -> Result<Vec<PythonInterpreter>> {
     let mut found_interpreters = Vec::new();
     if !interpreter.is_empty() {
@@ -1301,6 +1307,16 @@
         if !missing.is_empty() {
             let sysconfig_interps =
                 find_interpreter_in_sysconfig(bridge, &missing, target, 
requires_python)?;
+
+            // Can only use sysconfig-derived interpreter on windows if 
generating the import lib
+            if !sysconfig_interps.is_empty() && target.is_windows() && 
!generate_import_lib {
+                let found = sysconfig_interps
+                    .iter()
+                    .map(|i| format!("{} {}.{}", i.interpreter_kind, i.major, 
i.minor))
+                    .collect::<Vec<_>>();
+                bail!("Interpreters {found:?} were found in maturin's bundled 
sysconfig, but compiling for Windows without an interpreter requires PyO3's 
`generate-import-lib` feature");
+            }
+
             found_interpreters.extend(sysconfig_interps);
         }
     } else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/maturin-1.9.5/src/python_interpreter/mod.rs 
new/maturin-1.9.6/src/python_interpreter/mod.rs
--- old/maturin-1.9.5/src/python_interpreter/mod.rs     2025-10-04 
08:40:55.000000000 +0200
+++ new/maturin-1.9.6/src/python_interpreter/mod.rs     2025-10-07 
14:34:28.000000000 +0200
@@ -26,55 +26,6 @@
 pub const MAXIMUM_PYTHON_MINOR: usize = 13;
 pub const MAXIMUM_PYPY_MINOR: usize = 11;
 
-/// Identifies conditions where we do not want to build wheels
-fn windows_interpreter_no_build(
-    major: usize,
-    minor: usize,
-    target: &Target,
-    platform: String,
-    min_python_minor: usize,
-    requires_python: Option<&VersionSpecifiers>,
-) -> bool {
-    // Only python 3 with supported major versions
-    if major != 3 || minor < min_python_minor {
-        return true;
-    }
-
-    // From requires-python in pyproject.toml
-    if let Some(requires_python) = requires_python {
-        if !requires_python.contains(&Version::new([major as u64, minor as 
u64])) {
-            return true;
-        }
-    }
-
-    let python_arch = match platform.as_str() {
-        "win32" => Arch::X86,
-        "win-amd64" => Arch::X86_64,
-        "win-arm64" => Arch::Aarch64,
-        _ => {
-            eprintln!("⚠️  Warning: {major}.{minor} reports unknown platform 
'{platform}'. This may fail to build.");
-            // false => build it anyway
-            return false;
-        }
-    };
-
-    let target_arch = target.target_arch();
-
-    if python_arch != target.target_arch() {
-        eprintln!(
-            "👽 {major}.{minor} reports a platform '{platform}' (architecture 
'{python_arch}'), while the Rust target is '{target_arch}'. Skipping."
-        );
-        return true;
-    }
-    false
-}
-
-struct WindowsPythonInfo {
-    major: usize,
-    minor: usize,
-    platform: String, // e.g. win32, win-amd64, win-arm64
-}
-
 /// On windows regular Python installs are supported along with environments
 /// being managed by `conda`.
 ///
@@ -116,12 +67,32 @@
     target: &Target,
     bridge: &BridgeModel,
     requires_python: Option<&VersionSpecifiers>,
-) -> Result<Vec<String>> {
+) -> Result<Vec<PythonInterpreter>> {
     let min_python_minor = bridge.minimal_python_minor_version();
-    let code = "import sys; print(sys.executable or '')";
     let mut interpreter = vec![];
     let mut versions_found = HashSet::new();
 
+    macro_rules! maybe_add_interp {
+        ($executable:expr) => {
+            PythonInterpreter::check_executable($executable, target, 
bridge).map(|interp| {
+                if let Some(interp) = interp {
+                    let major = interp.major;
+                    let minor = interp.minor;
+                    if major == 3
+                        && minor >= min_python_minor
+                        && !versions_found.contains(&(major, minor))
+                        && requires_python.map_or(true, |requires_python| {
+                            requires_python.contains(&Version::new([major as 
u64, minor as u64]))
+                        })
+                    {
+                        interpreter.push(interp);
+                        versions_found.insert((major, minor));
+                    }
+                }
+            })
+        };
+    }
+
     // If Python is installed from Python.org it should include the "python 
launcher"
     // which is used to find the installed interpreters
     let execution = Command::new("cmd")
@@ -156,38 +127,7 @@
                     if !executable_path.exists() {
                         continue;
                     }
-                    if let Some(python_info) = 
windows_python_info(executable_path)? {
-                        if windows_interpreter_no_build(
-                            major,
-                            minor,
-                            target,
-                            python_info.platform,
-                            min_python_minor,
-                            requires_python,
-                        ) {
-                            continue;
-                        }
-
-                        let output = Command::new(executable).args(["-c", 
code]).output();
-                        let output = match output {
-                            Ok(output) => output,
-                            Err(err) => {
-                                eprintln!(
-                                    "⚠️  Warning: failed to determine the path 
to python for `{executable}`: {err}"
-                                );
-                                continue;
-                            }
-                        };
-                        let path = 
str::from_utf8(&output.stdout).unwrap().trim();
-                        if !output.status.success() || path.trim().is_empty() {
-                            eprintln!(
-                                "⚠️  Warning: couldn't determine the path to 
python for `{executable}`"
-                            );
-                            continue;
-                        }
-                        interpreter.push(path.to_string());
-                        versions_found.insert((major, minor));
-                    }
+                    maybe_add_interp!(executable_path)?;
                 }
             }
         }
@@ -218,20 +158,7 @@
             } else {
                 Path::new(&path).join("python")
             };
-            if let Some(python_info) = windows_python_info(&executable)? {
-                if windows_interpreter_no_build(
-                    python_info.major,
-                    python_info.minor,
-                    target,
-                    python_info.platform,
-                    min_python_minor,
-                    requires_python,
-                ) {
-                    continue;
-                }
-                interpreter.push(String::from(executable.to_str().unwrap()));
-                versions_found.insert((python_info.major, python_info.minor));
-            }
+            maybe_add_interp!(executable.as_path())?;
         }
     }
 
@@ -239,20 +166,7 @@
     for minor in min_python_minor..=bridge.maximum_python_minor_version() {
         if !versions_found.contains(&(3, minor)) {
             let executable = format!("python3.{minor}.exe");
-            if let Some(python_info) = 
windows_python_info(Path::new(&executable))? {
-                if windows_interpreter_no_build(
-                    python_info.major,
-                    python_info.minor,
-                    target,
-                    python_info.platform,
-                    min_python_minor,
-                    requires_python,
-                ) {
-                    continue;
-                }
-                interpreter.push(executable);
-                versions_found.insert((3, minor));
-            }
+            maybe_add_interp!(Path::new(&executable))?;
         }
     }
 
@@ -264,49 +178,6 @@
     Ok(interpreter)
 }
 
-fn windows_python_info(executable: &Path) -> Result<Option<WindowsPythonInfo>> 
{
-    let python_info = Command::new(executable)
-        .arg("-c")
-        .arg("import sys, sysconfig; print(sys.version_info.major, 
sys.version_info.minor, sysconfig.get_platform())")
-        .output();
-
-    let python_info = match python_info {
-        Ok(python_info) => python_info,
-        Err(err) => {
-            if err.kind() == io::ErrorKind::NotFound {
-                // python executable not found
-                return Ok(None);
-            } else {
-                bail!(
-                    "Error getting Python version info from {}",
-                    executable.display()
-                );
-            }
-        }
-    };
-
-    let version_info = str::from_utf8(&python_info.stdout).unwrap();
-
-    // Split into 3 segments: major, minor, platform by spaces
-    let segments: Vec<&str> = version_info.splitn(3, ' ').collect();
-    let [major, minor, platform] = segments.as_slice() else {
-        bail!(
-            "Unexpected output for Python version info from {}: '{}'",
-            executable.display(),
-            version_info
-        );
-    };
-    // can then parse each substring
-    let major = major.parse::<usize>().ok().unwrap_or(0);
-    let minor = minor.parse::<usize>().ok().unwrap_or(0);
-
-    Ok(Some(WindowsPythonInfo {
-        major,
-        minor,
-        platform: platform.to_string(),
-    }))
-}
-
 #[derive(Debug, Clone, Copy, Eq, PartialEq, Deserialize, clap::ValueEnum)]
 #[serde(rename_all = "lowercase")]
 #[clap(rename_all = "lower")]
@@ -644,9 +515,15 @@
                             let mut metadata_py = 
tempfile::NamedTempFile::new()?;
                             write!(metadata_py, "{GET_INTERPRETER_METADATA}")?;
                             let mut cmd = Command::new("cmd");
+                            let suffix = match target.target_arch() {
+                                Arch::X86 => "-32",
+                                Arch::X86_64 => "-64",
+                                Arch::Aarch64 => "-arm64",
+                                _ => "",
+                            };
                             cmd.arg("/c")
                                 .arg("py")
-                                .arg(format!("-{}-{}", ver, 
target.pointer_width()))
+                                .arg(format!("-{ver}{suffix}"))
                                 .arg(metadata_py.path())
                                 .env("PYTHONNOUSERSITE", "1");
                             let output = cmd.output();
@@ -669,6 +546,18 @@
             .context(err_msg)
             
.context(String::from_utf8_lossy(&output.stdout).trim().to_string())?;
 
+        Self::from_metadata_message(executable, target, bridge, message)
+    }
+
+    /// Configure a `PythonInterpreter` from the metadata message.
+    ///
+    /// Returns `None` if the interpreter is not suitable to use (e.g. too old 
or wrong architecture)
+    fn from_metadata_message(
+        executable: impl AsRef<Path>,
+        target: &Target,
+        bridge: &BridgeModel,
+        message: InterpreterMetadataMessage,
+    ) -> Result<Option<PythonInterpreter>> {
         if (message.major == 2 && message.minor != 7) || (message.major == 3 
&& message.minor < 5) {
             debug!(
                 "Skipping outdated python interpreter '{}'",
@@ -691,6 +580,41 @@
             executable.as_ref().display()
         ))?;
 
+        let executable = message
+            .executable
+            .map(PathBuf::from)
+            .unwrap_or_else(|| executable.as_ref().to_path_buf());
+
+        if target.is_windows() {
+            'windows_arch_check: {
+                // on windows we must check the architecture, because three 
different architectures
+                // can all run on the same hardware
+                let python_arch = match message.platform.as_str().trim() {
+                    "win32" => Arch::X86,
+                    "win-amd64" => Arch::X86_64,
+                    "win-arm64" => Arch::Aarch64,
+                    _ => {
+                        eprintln!(
+                            "⚠️  Warning: '{}' reports unknown platform. This 
may fail to build.",
+                            executable.display()
+                        );
+                        break 'windows_arch_check;
+                    }
+                };
+
+                if python_arch != target.target_arch() {
+                    eprintln!(
+                        "👽 '{}' reports a platform '{platform}' (architecture 
'{python_arch}'), while the Rust target is '{target_arch}'. Skipping.",
+                        executable.display(),
+                        platform = message.platform,
+                        python_arch = python_arch,
+                        target_arch = target.target_arch(),
+                    );
+                    return Ok(None);
+                }
+            }
+        }
+
         let platform = if message.platform.starts_with("macosx") {
             // We don't use platform from sysconfig on macOS
             None
@@ -698,10 +622,6 @@
             Some(message.platform.to_lowercase().replace(['-', '.'], "_"))
         };
 
-        let executable = message
-            .executable
-            .map(PathBuf::from)
-            .unwrap_or_else(|| executable.as_ref().to_path_buf());
         debug!(
             "Found {} interpreter at {}",
             interpreter,
@@ -807,37 +727,38 @@
         bridge: &BridgeModel,
         requires_python: Option<&VersionSpecifiers>,
     ) -> Result<Vec<PythonInterpreter>> {
-        let executables = if target.is_windows() {
+        if target.is_windows() {
             // TOFIX: add PyPy support to Windows
-            find_all_windows(target, bridge, requires_python)?
-        } else {
-            let mut executables: Vec<String> = 
(bridge.minimal_python_minor_version()
-                ..=bridge.maximum_python_minor_version())
-                .filter(|minor| {
-                    requires_python
-                        .map(|requires_python| {
-                            requires_python.contains(&Version::new([3, *minor 
as u64]))
-                        })
-                        .unwrap_or(true)
-                })
-                .map(|minor| format!("python3.{minor}"))
-                .collect();
-            // Also try to find PyPy for cffi and pyo3 bindings
-            if *bridge == BridgeModel::Cffi || bridge.is_pyo3() {
-                executables.extend(
-                    
(bridge.minimal_pypy_minor_version()..=bridge.maximum_pypy_minor_version())
-                        .filter(|minor| {
-                            requires_python
-                                .map(|requires_python| {
-                                    requires_python.contains(&Version::new([3, 
*minor as u64]))
-                                })
-                                .unwrap_or(true)
-                        })
-                        .map(|minor| format!("pypy3.{minor}")),
-                );
-            }
-            executables
+            return find_all_windows(target, bridge, requires_python);
         };
+
+        let mut executables: Vec<String> = 
(bridge.minimal_python_minor_version()
+            ..=bridge.maximum_python_minor_version())
+            .filter(|minor| {
+                requires_python
+                    .map(|requires_python| {
+                        requires_python.contains(&Version::new([3, *minor as 
u64]))
+                    })
+                    .unwrap_or(true)
+            })
+            .map(|minor| format!("python3.{minor}"))
+            .collect();
+
+        // Also try to find PyPy for cffi and pyo3 bindings
+        if *bridge == BridgeModel::Cffi || bridge.is_pyo3() {
+            executables.extend(
+                
(bridge.minimal_pypy_minor_version()..=bridge.maximum_pypy_minor_version())
+                    .filter(|minor| {
+                        requires_python
+                            .map(|requires_python| {
+                                requires_python.contains(&Version::new([3, 
*minor as u64]))
+                            })
+                            .unwrap_or(true)
+                    })
+                    .map(|minor| format!("pypy3.{minor}")),
+            );
+        }
+
         let mut available_versions = Vec::new();
         for executable in executables {
             if let Some(version) = 
PythonInterpreter::check_executable(executable, target, bridge)?
@@ -1195,135 +1116,140 @@
     }
 
     #[test]
-    fn test_windows_interpreter_no_build() {
-        use pep440_rs::VersionSpecifiers;
-        use std::str::FromStr;
-
+    fn test_interpreter_from_metadata_windows() {
         // Test cases for different scenarios
         let target_x64 = 
Target::from_resolved_target_triple("x86_64-pc-windows-msvc").unwrap();
         let target_x86 = 
Target::from_resolved_target_triple("i686-pc-windows-msvc").unwrap();
         let target_arm64 = 
Target::from_resolved_target_triple("aarch64-pc-windows-msvc").unwrap();
 
+        let bridge = BridgeModel::PyO3(PyO3 {
+            crate_name: PyO3Crate::PyO3,
+            version: semver::Version::new(0, 26, 0),
+            abi3: None,
+            metadata: None,
+        });
+
+        let message = |major, minor, platform: &str| 
InterpreterMetadataMessage {
+            major,
+            minor,
+            interpreter: "cpython".to_string(),
+            implementation_name: "CPython".to_string(),
+            abiflags: None,
+            ext_suffix: Some(".pyd".to_string()),
+            platform: platform.to_string(),
+            executable: None,
+            soabi: None,
+            gil_disabled: false,
+            system: "windows".to_string(),
+        };
+
         // Test Python 2.x should be rejected
-        assert!(windows_interpreter_no_build(
-            2,
-            7,
-            &target_x64,
-            "win-amd64".to_string(),
-            7,
-            None
-        ));
+        assert_eq!(
+            PythonInterpreter::from_metadata_message(
+                "python2.7",
+                &target_x64,
+                &bridge,
+                message(2, 7, "win-amd64"),
+            )
+            .unwrap_err()
+            .to_string(),
+            "Failed to get information from the python interpreter at 
python2.7"
+        );
 
         // Test Python 3.x but below minimum version
-        assert!(windows_interpreter_no_build(
-            3,
-            6,
-            &target_x64,
-            "win-amd64".to_string(),
-            7,
-            None
-        ));
+        assert_eq!(
+            PythonInterpreter::from_metadata_message(
+                "python3.6",
+                &target_x64,
+                &bridge,
+                message(3, 6, "win-amd64"),
+            )
+            .unwrap_err()
+            .to_string(),
+            "Failed to get information from the python interpreter at 
python3.6"
+        );
 
         // Test valid Python version with matching platform and architecture
-        assert!(!windows_interpreter_no_build(
-            3,
-            10,
-            &target_x64,
-            "win-amd64".to_string(),
-            7,
-            None
-        ));
-
-        // Test 32-bit Python on 64-bit target (should be rejected)
-        assert!(windows_interpreter_no_build(
-            3,
-            10,
-            &target_x64,
-            "win32".to_string(),
-            7,
-            None
-        ));
-
-        // Test 32-bit Python on 32-bit target (should be accepted)
-        assert!(!windows_interpreter_no_build(
-            3,
-            10,
-            &target_x86,
-            "win32".to_string(),
-            7,
-            None
-        ));
+        for (target, platform) in &[
+            (&target_x86, "win32"),
+            (&target_x64, "win-amd64"),
+            (&target_arm64, "win-arm64"),
+        ] {
+            assert_eq!(
+                PythonInterpreter::from_metadata_message(
+                    "python3.10",
+                    target,
+                    &bridge,
+                    message(3, 10, platform),
+                )
+                .unwrap()
+                .unwrap(),
+                PythonInterpreter {
+                    config: InterpreterConfig {
+                        major: 3,
+                        minor: 10,
+                        interpreter_kind: InterpreterKind::CPython,
+                        abiflags: "".to_string(),
+                        ext_suffix: ".pyd".to_string(),
+                        pointer_width: None,
+                        gil_disabled: false,
+                    },
+                    executable: PathBuf::from("python3.10"),
+                    platform: Some(platform.replace("-", "_")),
+                    runnable: true,
+                    implementation_name: "CPython".to_string(),
+                    soabi: None,
+                }
+            );
+        }
 
         // Test mismatched architectures
-        assert!(windows_interpreter_no_build(
-            3,
-            10,
-            &target_x64,
-            "win-arm64".to_string(),
-            7,
-            None
-        ));
-
-        assert!(windows_interpreter_no_build(
-            3,
-            10,
-            &target_arm64,
-            "win-amd64".to_string(),
-            7,
-            None
-        ));
-
-        // Test correct architecture matches
-        assert!(!windows_interpreter_no_build(
-            3,
-            10,
-            &target_arm64,
-            "win-arm64".to_string(),
-            7,
-            None
-        ));
-
-        // Test requires-python constraints
-        let requires_python = 
VersionSpecifiers::from_str(">=3.8,<3.12").unwrap();
+        for (target, platform) in &[
+            (&target_x86, "win-amd64"),
+            (&target_x86, "win-arm64"),
+            (&target_x64, "win32"),
+            (&target_x64, "win-arm64"),
+            (&target_arm64, "win32"),
+            (&target_arm64, "win-amd64"),
+        ] {
+            assert_eq!(
+                PythonInterpreter::from_metadata_message(
+                    "python3.10",
+                    target,
+                    &bridge,
+                    message(3, 10, platform),
+                )
+                .unwrap(),
+                None
+            );
+        }
 
-        // Should reject Python 3.7 due to requires-python
-        assert!(windows_interpreter_no_build(
-            3,
-            7,
-            &target_x64,
-            "win-amd64".to_string(),
-            7,
-            Some(&requires_python)
-        ));
-
-        // Should accept Python 3.10 within requires-python range
-        assert!(!windows_interpreter_no_build(
-            3,
-            10,
-            &target_x64,
-            "win-amd64".to_string(),
-            7,
-            Some(&requires_python)
-        ));
-
-        // Should reject Python 3.12 due to requires-python upper bound
-        assert!(windows_interpreter_no_build(
-            3,
-            12,
-            &target_x64,
-            "win-amd64".to_string(),
-            7,
-            Some(&requires_python)
-        ));
-
-        // Test edge case with unknown platform (should not match any specific 
architecture)
-        assert!(!windows_interpreter_no_build(
-            3,
-            10,
-            &target_x64,
-            "unknown-platform".to_string(),
-            7,
-            None
-        ));
+        // Test edge case with unknown platform (should not match any specific 
architecture, build anyway)
+        assert_eq!(
+            PythonInterpreter::from_metadata_message(
+                "python3.10",
+                &target_x64,
+                &bridge,
+                message(3, 10, "unknown-platform"),
+            )
+            .unwrap()
+            .unwrap(),
+            PythonInterpreter {
+                config: InterpreterConfig {
+                    major: 3,
+                    minor: 10,
+                    interpreter_kind: InterpreterKind::CPython,
+                    abiflags: "".to_string(),
+                    ext_suffix: ".pyd".to_string(),
+                    pointer_width: None,
+                    gil_disabled: false,
+                },
+                executable: PathBuf::from("python3.10"),
+                platform: Some("unknown_platform".to_string()),
+                runnable: true,
+                implementation_name: "CPython".to_string(),
+                soabi: None,
+            }
+        );
     }
 }

++++++ vendor.tar.xz ++++++
/work/SRC/openSUSE:Factory/python-maturin/vendor.tar.xz 
/work/SRC/openSUSE:Factory/.python-maturin.new.5300/vendor.tar.xz differ: char 
15, line 1

Reply via email to