From a8334afd3eecfed6260130b5136551b5364d522f Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 27 Jun 2025 22:38:47 -0500 Subject: [PATCH] Gate `x86_64-w64-mingw32-nmakehlp.exe` removal to builds where it is present --- cpython-windows/build.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/cpython-windows/build.py b/cpython-windows/build.py index 0df651e11..3b0c3b414 100644 --- a/cpython-windows/build.py +++ b/cpython-windows/build.py @@ -1401,15 +1401,16 @@ def build_cpython( shutil.copyfile(source, dest) # Delete the tk nmake helper, it's not needed and links msvc - tcltk_commit: str = DOWNLOADS[tk_bin_entry]["git_commit"] - tcltk_path = td / ("cpython-bin-deps-%s" % tcltk_commit) - ( - tcltk_path - / build_directory - / "lib" - / "nmake" - / "x86_64-w64-mingw32-nmakehlp.exe" - ).unlink() + if tk_bin_entry == "tk-windows-bin": + tcltk_commit: str = DOWNLOADS[tk_bin_entry]["git_commit"] + tcltk_path = td / ("cpython-bin-deps-%s" % tcltk_commit) + ( + tcltk_path + / build_directory + / "lib" + / "nmake" + / "x86_64-w64-mingw32-nmakehlp.exe" + ).unlink() cpython_source_path = td / ("Python-%s" % python_version) pcbuild_path = cpython_source_path / "PCbuild"