Allow selection of debug build interpreters (#11520)

Extends the `PythonVariant` logic to support interpreters with the debug
flag enabled.
This commit is contained in:
Zanie Blue
2025-09-12 08:32:22 -05:00
committed by GitHub
parent 8917b00fd9
commit 8f3583a6e6
17 changed files with 8015 additions and 109 deletions
+3 -3
View File
@@ -106,7 +106,7 @@ fn find_sysconfigdata(
.join("lib")
.join(format!("python{major}.{minor}{suffix}"));
if !lib.exists() {
return Err(Error::MissingLib);
return Err(Error::MissingLib(lib));
}
// Probe the `lib` directory for `_sysconfigdata_`.
@@ -270,8 +270,8 @@ fn patch_pkgconfig(contents: &str) -> Option<String> {
pub enum Error {
#[error(transparent)]
Io(#[from] std::io::Error),
#[error("Python installation is missing a `lib` directory")]
MissingLib,
#[error("Python installation is missing a `lib` directory at: {0}")]
MissingLib(PathBuf),
#[error("Python installation is missing a `_sysconfigdata_` file")]
MissingSysconfigdata,
#[error(transparent)]