Skip to content

Commit 4e98498

Browse files
committed
Use consistency exception type
1 parent 1bef021 commit 4e98498

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

cpython-windows/build.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ def find_additional_dependencies(project: pathlib.Path):
10901090
elif arch == "arm64":
10911091
abi_platform = "win_arm64"
10921092
else:
1093-
raise ValueError("unhandled arch: %s" % arch)
1093+
raise Exception("unhandled architecture: %s" % arch)
10941094

10951095
if freethreaded:
10961096
abi_tag = ".cp%st-%s" % (python_majmin, abi_platform)
@@ -1276,7 +1276,11 @@ def build_cpython(
12761276
# runtime dependencies, so we are conservative and use the old version
12771277
# elsewhere. The old version isn't built for arm64, so we use the new
12781278
# version there too
1279-
tk_bin_entry = "tk-windows-bin" if meets_python_minimum_version(python_version, "3.14") or arch == "arm64" else "tk-windows-bin-8612"
1279+
tk_bin_entry = (
1280+
"tk-windows-bin"
1281+
if meets_python_minimum_version(python_version, "3.14") or arch == "arm64"
1282+
else "tk-windows-bin-8612"
1283+
)
12801284
tk_bin_archive = download_entry(
12811285
tk_bin_entry, BUILD, local_name="tk-windows-bin.tar.gz"
12821286
)
@@ -1357,7 +1361,13 @@ def build_cpython(
13571361
# Delete the tk nmake helper, it's not needed and links msvc
13581362
tcltk_commit: str = DOWNLOADS[tk_bin_entry]["git_commit"]
13591363
tcltk_path = td / ("cpython-bin-deps-%s" % tcltk_commit)
1360-
(tcltk_path / build_directory / "lib" / "nmake" / "x86_64-w64-mingw32-nmakehlp.exe").unlink()
1364+
(
1365+
tcltk_path
1366+
/ build_directory
1367+
/ "lib"
1368+
/ "nmake"
1369+
/ "x86_64-w64-mingw32-nmakehlp.exe"
1370+
).unlink()
13611371

13621372
cpython_source_path = td / ("Python-%s" % python_version)
13631373
pcbuild_path = cpython_source_path / "PCbuild"

0 commit comments

Comments
 (0)