From 3fe9cb9cff4a5f1bf2e55e171cdc15be01c189d6 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Sat, 3 Oct 2020 13:09:57 -0700 Subject: [PATCH] windows: filter out static extensions before checking for presence Otherwise static can fail if ignore_static is set but ignore_missing isn't. --- cpython-windows/build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpython-windows/build.py b/cpython-windows/build.py index 2494117e..9e50d09c 100644 --- a/cpython-windows/build.py +++ b/cpython-windows/build.py @@ -1598,6 +1598,9 @@ def collect_python_build_artifacts( dirs = {p for p in os.listdir(intermediates_path)} for extension, entry in CONVERT_TO_BUILTIN_EXTENSIONS.items(): + if static and entry.get("ignore_static"): + continue + if extension not in dirs: if entry.get("ignore_missing"): continue @@ -1605,9 +1608,6 @@ def collect_python_build_artifacts( log("extension not present: %s" % extension) sys.exit(1) - if static and entry.get("ignore_static"): - continue - extension_projects.add(extension) if static: depends_projects |= set(entry.get("static_depends", []))