diff --git a/src/build_options.rs b/src/build_options.rs index 80244beeb..7588e78c6 100644 --- a/src/build_options.rs +++ b/src/build_options.rs @@ -708,7 +708,6 @@ pub fn find_interpreter( ext_suffix: ext_suffix.to_string(), interpreter_kind, abi_tag, - libs_dir: PathBuf::from(cross_lib_dir), platform: None, runnable: false, }]; @@ -744,7 +743,7 @@ pub fn find_interpreter( // Unfortunately, on windows we need one to figure out base_prefix for a linker // argument. if target.is_windows() { - if let Some(manual_base_prefix) = std::env::var_os("PYO3_CROSS_LIB_DIR") { + if env::var_os("PYO3_CROSS_LIB_DIR").is_some() { // PYO3_CROSS_LIB_DIR should point to the `libs` directory inside base_prefix // when cross compiling, so we fake a python interpreter matching it println!("⚠️ Cross-compiling is poorly supported"); @@ -757,7 +756,6 @@ pub fn find_interpreter( ext_suffix: ".pyd".to_string(), interpreter_kind: InterpreterKind::CPython, abi_tag: None, - libs_dir: PathBuf::from(manual_base_prefix), platform: None, runnable: false, }]) @@ -776,7 +774,6 @@ pub fn find_interpreter( ext_suffix: ".pyd".to_string(), interpreter_kind: InterpreterKind::CPython, abi_tag: None, - libs_dir: PathBuf::new(), platform: None, runnable: false, }]) diff --git a/src/get_interpreter_metadata.py b/src/get_interpreter_metadata.py index 3bf13fe95..5c63488be 100644 --- a/src/get_interpreter_metadata.py +++ b/src/get_interpreter_metadata.py @@ -28,8 +28,6 @@ "platform": sysconfig.get_platform(), # This one isn't technically necessary, but still very useful for sanity checks "system": platform.system().lower(), - # We need this one for windows abi3 builds - "base_prefix": sys.base_prefix, } print(json.dumps(metadata)) diff --git a/src/python_interpreter.rs b/src/python_interpreter.rs index f15918678..75aee6e47 100644 --- a/src/python_interpreter.rs +++ b/src/python_interpreter.rs @@ -256,7 +256,6 @@ struct IntepreterMetadataMessage { // comes from `platform.system()` system: String, abi_tag: Option, - base_prefix: String, } /// The location and version of an interpreter @@ -287,8 +286,6 @@ pub struct PythonInterpreter { /// /// Note that this always `None` on windows pub abi_tag: Option, - /// We need this value for windows abi3 linking - pub libs_dir: PathBuf, /// Comes from `sysconfig.get_platform()` /// /// Note that this can be `None` when cross compiling @@ -528,7 +525,6 @@ impl PythonInterpreter { .context("syconfig didn't define an `EXT_SUFFIX` ಠ_ಠ")?, interpreter_kind: interpreter, abi_tag: message.abi_tag, - libs_dir: PathBuf::from(message.base_prefix).join("libs"), platform, runnable: true, }))