Skip to content

Commit 3a69e62

Browse files
committed
Fix handling of _PyWarnings_Init on non-Windows
1 parent 32da092 commit 3a69e62

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/validation.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,10 +1962,14 @@ fn validate_distribution(
19621962
// Static distributions never export symbols.
19631963
let wanted = if is_static {
19641964
false
1965-
// For some strange reason _PyWarnings_Init is exported as part of the ABI before
1966-
// Python 3.13.
1965+
// For some strange reason _PyWarnings_Init is exported as part of the ABI
19671966
} else if name == "_warnings" {
1968-
matches!(python_major_minor, "3.8" | "3.9" | "3.10" | "3.11" | "3.12")
1967+
// But not on Python 3.13 on Windows
1968+
if triple.contains("-windows-") {
1969+
matches!(python_major_minor, "3.8" | "3.9" | "3.10" | "3.11" | "3.12")
1970+
} else {
1971+
true
1972+
}
19691973
// Windows dynamic doesn't export extension module init functions.
19701974
} else if triple.contains("-windows-") {
19711975
false

0 commit comments

Comments
 (0)