Fix python 3 linux build.

This commit is contained in:
Daniel Grunwald 2015-05-26 19:37:08 +02:00
parent 6b7b47d2a7
commit e848189692
1 changed files with 3 additions and 4 deletions

View File

@ -129,12 +129,11 @@ fn run_python_script(script: &str) -> Result<String, String> {
#[cfg(not(target_os="macos"))]
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 {
Ok(format!("cargo:rustc-link-lib=python{}.{}", version.major,
version.minor))
Ok(format!("cargo:rustc-link-lib=python{}", dotted_version))
} else {
Ok(format!("cargo:rustc-link-lib=static=python{}.{}", version.major,
version.minor))
Ok(format!("cargo:rustc-link-lib=static=python{}", dotted_version))
}
}