Skip to content

Commit

Permalink
windows: use proper openssl archives
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
indygreg committed Apr 9, 2020
1 parent ed0668e commit 7cd09e6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cpython-windows/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,10 @@ def build_cpython(arch: str, profile):
setuptools_archive = download_entry("setuptools", BUILD)
pip_archive = download_entry("pip", BUILD)

openssl_bin_archive = BUILD / ("openssl-windows-%s.tar" % arch)
if static:
openssl_bin_archive = BUILD / ("openssl-windows-%s-static.tar" % arch)
else:
openssl_bin_archive = BUILD / ("openssl-windows-%s-shared.tar" % arch)

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

with concurrent.futures.ThreadPoolExecutor(8) as e:
fs = []
for a in (
python_archive,
bzip2_archive,
Expand All @@ -1528,7 +1532,10 @@ def build_cpython(arch: str, profile):
zlib_archive,
):
log("extracting %s to %s" % (a, td))
e.submit(extract_tar_to_directory, a, td)
fs.append(e.submit(extract_tar_to_directory, a, td))

for f in fs:
f.result()

with zipfile.ZipFile(setuptools_archive) as zf:
zf.extractall(td)
Expand Down

0 comments on commit 7cd09e6

Please sign in to comment.