Skip to content

Commit

Permalink
Link python3.lib instead of python3x.lib on Windows in abi3 mode
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Sep 23, 2020
1 parent e33e58f commit d8c8c17
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,11 @@ fn run_python_script(interpreter: &Path, script: &str) -> Result<String> {

fn get_library_link_name(version: &PythonVersion, ld_version: &str) -> String {
if cfg!(target_os = "windows") {
// Mirrors the behavior in CPython's `PC/pyconfig.h`.
if env::var_os("CARGO_FEATURE_ABI3").is_some() {
return "python3".to_string();
}

let minor_or_empty_string = match version.minor {
Some(minor) => format!("{}", minor),
None => String::new(),
Expand Down

0 comments on commit d8c8c17

Please sign in to comment.