Skip to content

Commit 7cd09e6

Browse files
committed
windows: use proper openssl archives
This regressed a while ago and I never noticed, likely because I had the old tar files sitting around in the build/ directory. As part of this, we also check the future result to catch errors. Otherwise things continue to build even if the archive fails to extract and we get a weird error about missing files!
1 parent ed0668e commit 7cd09e6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

cpython-windows/build.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,10 @@ def build_cpython(arch: str, profile):
15001500
setuptools_archive = download_entry("setuptools", BUILD)
15011501
pip_archive = download_entry("pip", BUILD)
15021502

1503-
openssl_bin_archive = BUILD / ("openssl-windows-%s.tar" % arch)
1503+
if static:
1504+
openssl_bin_archive = BUILD / ("openssl-windows-%s-static.tar" % arch)
1505+
else:
1506+
openssl_bin_archive = BUILD / ("openssl-windows-%s-shared.tar" % arch)
15041507

15051508
if arch == "amd64":
15061509
build_platform = "x64"
@@ -1517,6 +1520,7 @@ def build_cpython(arch: str, profile):
15171520
td = pathlib.Path(td)
15181521

15191522
with concurrent.futures.ThreadPoolExecutor(8) as e:
1523+
fs = []
15201524
for a in (
15211525
python_archive,
15221526
bzip2_archive,
@@ -1528,7 +1532,10 @@ def build_cpython(arch: str, profile):
15281532
zlib_archive,
15291533
):
15301534
log("extracting %s to %s" % (a, td))
1531-
e.submit(extract_tar_to_directory, a, td)
1535+
fs.append(e.submit(extract_tar_to_directory, a, td))
1536+
1537+
for f in fs:
1538+
f.result()
15321539

15331540
with zipfile.ZipFile(setuptools_archive) as zf:
15341541
zf.extractall(td)

0 commit comments

Comments
 (0)