Skip to content

Commit

Permalink
Attempt to download and build mpdecimal on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Sep 4, 2024
1 parent d33c58b commit 18285dc
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions cpython-windows/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,12 @@ def build_cpython(
setuptools_wheel = download_entry("setuptools", BUILD)
pip_wheel = download_entry("pip", BUILD)

# CPython 3.13+ no longer uses a bundled version by default
if meets_python_minimum_version(python_version, "3.13"):
mpdecimal_archive = download_entry("mpdecimal", BUILD)
else:
mpdecimal_archive = None

if arch == "amd64":
build_platform = "x64"
build_directory = "amd64"
Expand All @@ -1426,12 +1432,16 @@ def build_cpython(
for a in (
python_archive,
bzip2_archive,
mpdecimal_archive,
openssl_archive,
sqlite_archive,
tk_bin_archive,
xz_archive,
zlib_archive,
):
if a is None:
continue

log("extracting %s to %s" % (a, td))
fs.append(e.submit(extract_tar_to_directory, a, td))

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

# CPython 3.13+ no longer uses a bundled libmpdec by default
# TODO(zanieb): We should use the system libmpdec as we do for Unix builds
if meets_python_minimum_version(python_version, "3.13"):
args.append("--with-system-libmpdec=no")

args.extend(["--include-idle", "--include-stable", "--include-tcltk"])

exec_and_log(
Expand Down

0 comments on commit 18285dc

Please sign in to comment.