MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / get_macos_linkmodel

Function get_macos_linkmodel

python3-sys/build.rs:214–219  ·  view source on GitHub ↗
(expected_version: &PythonVersion)

Source from the content-addressed store, hash-verified

212
213#[cfg(target_os = "macos")]
214fn get_macos_linkmodel(expected_version: &PythonVersion) -> Result<String, String> {
215 let script = "import sysconfig; print('framework' if sysconfig.get_config_var('PYTHONFRAMEWORK') else ('shared' if sysconfig.get_config_var('Py_ENABLE_SHARED') else 'static'));";
216 let (_, interpreter_path, _) = find_interpreter_and_get_config(expected_version)?;
217 let out = run_python_script(&interpreter_path, script).unwrap();
218 Ok(out.trim_end().to_owned())
219}
220
221#[cfg(target_os = "macos")]
222fn get_rustc_link_lib(

Callers 1

get_rustc_link_libFunction · 0.70

Calls 2

run_python_scriptFunction · 0.70

Tested by

no test coverage detected