Skip to content

Commit 18285dc

Browse files
committed
Attempt to download and build mpdecimal on Windows
1 parent d33c58b commit 18285dc

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

cpython-windows/build.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,6 +1409,12 @@ def build_cpython(
14091409
setuptools_wheel = download_entry("setuptools", BUILD)
14101410
pip_wheel = download_entry("pip", BUILD)
14111411

1412+
# CPython 3.13+ no longer uses a bundled version by default
1413+
if meets_python_minimum_version(python_version, "3.13"):
1414+
mpdecimal_archive = download_entry("mpdecimal", BUILD)
1415+
else:
1416+
mpdecimal_archive = None
1417+
14121418
if arch == "amd64":
14131419
build_platform = "x64"
14141420
build_directory = "amd64"
@@ -1426,12 +1432,16 @@ def build_cpython(
14261432
for a in (
14271433
python_archive,
14281434
bzip2_archive,
1435+
mpdecimal_archive,
14291436
openssl_archive,
14301437
sqlite_archive,
14311438
tk_bin_archive,
14321439
xz_archive,
14331440
zlib_archive,
14341441
):
1442+
if a is None:
1443+
continue
1444+
14351445
log("extracting %s to %s" % (a, td))
14361446
fs.append(e.submit(extract_tar_to_directory, a, td))
14371447

@@ -1599,11 +1609,6 @@ def build_cpython(
15991609
if not meets_python_minimum_version(python_version, "3.12"):
16001610
args.append("--include-distutils")
16011611

1602-
# CPython 3.13+ no longer uses a bundled libmpdec by default
1603-
# TODO(zanieb): We should use the system libmpdec as we do for Unix builds
1604-
if meets_python_minimum_version(python_version, "3.13"):
1605-
args.append("--with-system-libmpdec=no")
1606-
16071612
args.extend(["--include-idle", "--include-stable", "--include-tcltk"])
16081613

16091614
exec_and_log(

0 commit comments

Comments
 (0)