From 8f404c4db5ac5b9e735d4e0cf07f934b57ee7ba3 Mon Sep 17 00:00:00 2001 From: Dexter Chua Date: Mon, 4 Jan 2021 22:24:39 +0800 Subject: [PATCH] Let pyconfig.h not define Py_ENABLE_SHARED If there is no line that defines Py_ENABLE_SHARED in `pyconfig.h`, then it is false --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 7350c42d..aac77d88 100644 --- a/build.rs +++ b/build.rs @@ -488,7 +488,7 @@ fn load_cross_compile_from_headers( let interpreter_config = InterpreterConfig { version: python_version, libdir: cross_compile_config.lib_dir.to_str().map(String::from), - shared: config_data.get_bool("Py_ENABLE_SHARED")?, + shared: config_data.get_bool("Py_ENABLE_SHARED").unwrap_or(false), ld_version: format!("{}.{}", major, minor), base_prefix: "".to_string(), executable: PathBuf::new(),