Skip to content

Commit

Permalink
Fix generating import lib for PyPy when abi3 feature is enabled (#4806)
Browse files Browse the repository at this point in the history
  • Loading branch information
messense authored Dec 18, 2024
1 parent c869e51 commit ea8c461
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions newsfragments/4806.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix generating import lib for PyPy when `abi3` feature is enabled.
6 changes: 5 additions & 1 deletion pyo3-build-config/src/impl_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,11 @@ print("gil_disabled", get_config_var("Py_GIL_DISABLED"))
// Auto generate python3.dll import libraries for Windows targets.
if self.lib_dir.is_none() {
let target = target_triple_from_env();
let py_version = if self.abi3 { None } else { Some(self.version) };
let py_version = if self.implementation == PythonImplementation::CPython && self.abi3 {
None
} else {
Some(self.version)
};
let abiflags = if self.is_free_threaded() {
Some("t")
} else {
Expand Down

0 comments on commit ea8c461

Please sign in to comment.