Skip to content

Commit

Permalink
build-config: Always pass abi3 flag to default_lib_name_windows()
Browse files Browse the repository at this point in the history
Hardcoding `false` here leads to an incorrect abi3 DLL name
when cross-compiling to Windows.
  • Loading branch information
ravenexp authored and davidhewitt committed Sep 22, 2021
1 parent f771d16 commit 2f74ab0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fix building with a conda environment on Windows. [#1873](https://github.com/PyO3/pyo3/pull/1873)
- Fix panic on Python 3.6 when calling `Python::with_gil` with Python initialized but threading not initialized. [#1874](https://github.com/PyO3/pyo3/pull/1874)
- Fix incorrect linking to version-specific DLL instead of `python3.dll` when cross-compiling to Windows with `abi3`. [#1880](https://github.com/PyO3/pyo3/pull/1880)

## [0.14.5] - 2021-09-05

Expand Down
6 changes: 4 additions & 2 deletions pyo3-build-config/src/impl_.rs
Expand Up @@ -982,12 +982,14 @@ fn windows_hardcoded_cross_compile(
let version = cross_compile_config.version.or_else(get_abi3_version)
.ok_or("PYO3_CROSS_PYTHON_VERSION or an abi3-py3* feature must be specified when cross-compiling for Windows.")?;

let abi3 = is_abi3();

Ok(InterpreterConfig {
implementation: PythonImplementation::CPython,
version,
shared: true,
abi3: is_abi3(),
lib_name: Some(default_lib_name_windows(version, false, false)),
abi3,
lib_name: Some(default_lib_name_windows(version, abi3, false)),
lib_dir: cross_compile_config.lib_dir.to_str().map(String::from),
executable: None,
pointer_width: None,
Expand Down

0 comments on commit 2f74ab0

Please sign in to comment.