Merge pull request #45 from royalstream/royalstream-macos

get_macos_linkmodel fix
This commit is contained in:
Daniel Grunwald 2016-04-17 23:46:18 +02:00
commit d826377d4f
1 changed files with 1 additions and 1 deletions

View File

@ -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())
}