Merge pull request #45 from royalstream/royalstream-macos
get_macos_linkmodel fix
This commit is contained in:
commit
d826377d4f
|
@ -189,7 +189,7 @@ fn get_rustc_link_lib(_: &PythonVersion, ld_version: &str, enable_shared: bool)
|
|||
|
||||
#[cfg(target_os="macos")]
|
||||
fn get_macos_linkmodel() -> Result<String, String> {
|
||||
let script = "import MacOS; print MacOS.linkmodel;";
|
||||
let script = "import sysconfig; print('framework' if sysconfig.get_config_var('PYTHONFRAMEWORK') else ('shared' if sysconfig.get_config_var('Py_ENABLE_SHARED') else 'static'));";
|
||||
let out = run_python_script("python", script).unwrap();
|
||||
Ok(out.trim_right().to_owned())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue