Fix python 3 linux build.
This commit is contained in:
parent
6b7b47d2a7
commit
e848189692
|
@ -129,12 +129,11 @@ fn run_python_script(script: &str) -> Result<String, String> {
|
||||||
|
|
||||||
#[cfg(not(target_os="macos"))]
|
#[cfg(not(target_os="macos"))]
|
||||||
fn get_rustc_link_lib(version: &PythonVersion, enable_shared: bool) -> Result<String, String> {
|
fn get_rustc_link_lib(version: &PythonVersion, enable_shared: bool) -> Result<String, String> {
|
||||||
|
let dotted_version = format!("{}.{}", version.major, version.minor.unwrap());
|
||||||
if enable_shared {
|
if enable_shared {
|
||||||
Ok(format!("cargo:rustc-link-lib=python{}.{}", version.major,
|
Ok(format!("cargo:rustc-link-lib=python{}", dotted_version))
|
||||||
version.minor))
|
|
||||||
} else {
|
} else {
|
||||||
Ok(format!("cargo:rustc-link-lib=static=python{}.{}", version.major,
|
Ok(format!("cargo:rustc-link-lib=static=python{}", dotted_version))
|
||||||
version.minor))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue