diff --git a/cpython-windows/build.py b/cpython-windows/build.py index 638a2c78..394e6578 100644 --- a/cpython-windows/build.py +++ b/cpython-windows/build.py @@ -114,7 +114,7 @@ "_lzma": ["xz"], "_sqlite3": ["sqlite"], "_ssl": ["openssl"], - "_tkinter": ["tcl-8612", "tk-8612", "tix"], + "_tkinter": ["tcl", "tk", "tix"], "_uuid": ["uuid"], "zlib": ["zlib"], } @@ -362,7 +362,7 @@ def hack_props( if meets_python_minimum_version(python_version, "3.14"): tcltk_commit = DOWNLOADS["tk-windows-bin"]["git_commit"] else: - tcltk_commit = DOWNLOADS["tk-windows-bin-8612"]["git_commit"] + tcltk_commit = DOWNLOADS["tk-windows-bin"]["git_commit"] sqlite_path = td / ("sqlite-autoconf-%s" % sqlite_version) bzip2_path = td / ("bzip2-%s" % bzip2_version) @@ -1138,10 +1138,6 @@ def find_additional_dependencies(project: pathlib.Path): if name == "openssl": name = openssl_entry - # On 3.14+, we use the latest tcl/tk version - if ext == "_tkinter" and python_majmin == "314": - name = name.replace("-8612", "") - download_entry = DOWNLOADS[name] # This will raise if no license metadata defined. This is @@ -1230,7 +1226,7 @@ def build_cpython( ) else: tk_bin_archive = download_entry( - "tk-windows-bin-8612", BUILD, local_name="tk-windows-bin.tar.gz" + "tk-windows-bin", BUILD, local_name="tk-windows-bin.tar.gz" ) # CPython 3.13+ no longer uses a bundled `mpdecimal` version so we build it @@ -1303,6 +1299,18 @@ def build_cpython( log("copying %s to %s" % (source, dest)) shutil.copyfile(source, dest) + # Delete the tk nmake helper, it's not needed and links msvc + tcltk_commit = DOWNLOADS["tk-windows-bin"]["git_commit"] + tcltk_path = td / ("cpython-bin-deps-%s" % tcltk_commit) + tcltk_arch = {"amd64": "amd64", "x86": "win32"}[arch] + ( + tcltk_path + / tcltk_arch + / "lib" + / "nmake" + / "x86_64-w64-mingw32-nmakehlp.exe" + ).unlink() + cpython_source_path = td / ("Python-%s" % python_version) pcbuild_path = cpython_source_path / "PCbuild" diff --git a/pythonbuild/downloads.py b/pythonbuild/downloads.py index aff18afd..c420aad2 100644 --- a/pythonbuild/downloads.py +++ b/pythonbuild/downloads.py @@ -341,31 +341,6 @@ "version": "8.6.14", "git_commit": "c624cc881bd0e5071dec9de4b120cbe9985d8c14", }, - "tcl-8612": { - "url": "https://prdownloads.sourceforge.net/tcl/tcl8.6.12-src.tar.gz", - "size": 10353486, - "sha256": "26c995dd0f167e48b11961d891ee555f680c175f7173ff8cb829f4ebcde4c1a6", - "version": "8.6.12", - "library_names": ["tcl8.6"], - "licenses": ["TCL"], - "license_file": "LICENSE.tcl.txt", - }, - "tk-8612": { - "url": "https://prdownloads.sourceforge.net/tcl/tk8.6.12-src.tar.gz", - "size": 4515393, - "sha256": "12395c1f3fcb6bed2938689f797ea3cdf41ed5cb6c4766eec8ac949560310630", - "version": "8.6.12", - "library_names": ["tk8.6"], - "licenses": ["TCL"], - "license_file": "LICENSE.tcl.txt", - }, - "tk-windows-bin-8612": { - "url": "https://github.com/python/cpython-bin-deps/archive/e3c3e9a2856124aa32b608632a52742d479eb7a9.tar.gz", - "size": 6787654, - "sha256": "01ad9c663659224e075d487cbc33ea2fed7a225593965b79bed92ca7f79b676f", - "version": "8.6.12", - "git_commit": "e3c3e9a2856124aa32b608632a52742d479eb7a9", - }, "uuid": { "url": "https://sourceforge.net/projects/libuuid/files/libuuid-1.0.3.tar.gz", "size": 318256, diff --git a/src/validation.rs b/src/validation.rs index 4bb28de0..d4c1f889 100644 --- a/src/validation.rs +++ b/src/validation.rs @@ -99,6 +99,7 @@ const PE_ALLOWED_LIBRARIES: &[&str] = &[ "IPHLPAPI.DLL", "KERNEL32.dll", "msi.dll", + "msvcrt.dll", "NETAPI32.dll", "ole32.dll", "OLEAUT32.dll", @@ -135,6 +136,8 @@ const PE_ALLOWED_LIBRARIES: &[&str] = &[ "sqlite3.dll", "tcl86t.dll", "tk86t.dll", + // Bundled with tk + "zlib1.dll", ]; // CPython 3.14 uses tcl/tk 8.6.14+ which includes a bundled zlib and dynamically links to msvcrt.