Skip to content

Commit

Permalink
Change default python lib name for Windows when cross compiling
Browse files Browse the repository at this point in the history
Stop treating `gnu` abi as mingw by default.
  • Loading branch information
messense committed May 11, 2022
1 parent 1340582 commit ea37acb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pyo3-build-config/src/impl_.rs
Expand Up @@ -1391,13 +1391,11 @@ fn default_cross_compile(cross_compile_config: &CrossCompileConfig) -> Result<In
.unwrap_or(PythonImplementation::CPython);

let lib_name = if cross_compile_config.target.operating_system == OperatingSystem::Windows {
let mingw = cross_compile_config.target.environment == Environment::Gnu;

Some(default_lib_name_windows(
version,
implementation,
abi3,
mingw,
false,
))
} else if is_linking_libpython_for_target(&cross_compile_config.target) {
Some(default_lib_name_unix(version, implementation, None))
Expand Down Expand Up @@ -2136,7 +2134,7 @@ mod tests {
version: PythonVersion { major: 3, minor: 8 },
shared: true,
abi3: false,
lib_name: Some("python3.8".into()),
lib_name: Some("python38".into()),
lib_dir: Some("/usr/lib/mingw".into()),
executable: None,
pointer_width: None,
Expand Down

0 comments on commit ea37acb

Please sign in to comment.