Skip to content

Commit c6a4d27

Browse files
committed
Allow _wmi
1 parent 5b3edf8 commit c6a4d27

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

cpython-windows/build.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,10 +573,13 @@ def hack_project_files(
573573
rb'<ClCompile Include="$(opensslIncludeDir)\openssl\applink.c">',
574574
)
575575

576-
# We're still on the pre-built tk-windows-bin 8.6.12 which doesn't have a
577-
# standalone zlib DLL. So remove references to it from 3.12+.
578-
# On 3.14, something changed
579-
if meets_python_minimum_version(python_version, "3.12") and meets_python_maximum_version(python_version, "3.13"):
576+
# Python 3.12+ uses the the pre-built tk-windows-bin 8.6.12 which doesn't
577+
# have a standalone zlib DLL, so we remove references to it. For Python
578+
# 3.14+, we're using tk-windows-bin 8.6.14 which includes a prebuilt zlib
579+
# DLL, so we skip this patch there.
580+
if meets_python_minimum_version(
581+
python_version, "3.12"
582+
) and meets_python_maximum_version(python_version, "3.13"):
580583
static_replace_in_file(
581584
pcbuild_path / "_tkinter.vcxproj",
582585
rb'<_TclTkDLL Include="$(tcltkdir)\bin\$(tclZlibDllName)" />',

src/validation.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,8 @@ const GLOBAL_EXTENSIONS_WINDOWS: &[&str] = &[
798798
"winsound",
799799
];
800800

801+
const GLOBAL_EXTENSIONS_WINDOWS_3_14: &[&str] = &["_wmi"];
802+
801803
const GLOBAL_EXTENSIONS_WINDOWS_PRE_3_13: &[&str] = &["_msi"];
802804

803805
/// Extension modules not present in Windows static builds.
@@ -1542,6 +1544,10 @@ fn validate_extension_modules(
15421544
wanted.extend(GLOBAL_EXTENSIONS_WINDOWS_PRE_3_13);
15431545
}
15441546

1547+
if matches!(python_major_minor, "3.14") {
1548+
wanted.extend(GLOBAL_EXTENSIONS_WINDOWS_3_14);
1549+
}
1550+
15451551
if static_crt {
15461552
for x in GLOBAL_EXTENSIONS_WINDOWS_NO_STATIC {
15471553
wanted.remove(*x);

0 commit comments

Comments
 (0)