Skip to content

Commit b87a4dd

Browse files
committed
windows: add _uuid and _zoneinfo extensions
These were added to the build in cpython 3.9 and need added to our list of extensions to convert to static. This required teaching the build system to ignore missing extensions, as these aren't present on Python <3.9.
1 parent e48ce47 commit b87a4dd

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

cpython-windows/build.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
},
7070
"_tkinter": {"ignore_static": True, "shared_depends": ["tcl86t", "tk86t"],},
7171
"_queue": {},
72+
"_uuid": {"ignore_missing": True},
73+
"_zoneinfo": {"ignore_missing": True},
7274
"pyexpat": {},
7375
"select": {},
7476
"unicodedata": {},
@@ -1588,7 +1590,16 @@ def collect_python_build_artifacts(
15881590
# Projects that provide extensions.
15891591
extension_projects = set()
15901592

1593+
dirs = {p for p in os.listdir(intermediates_path)}
1594+
15911595
for extension, entry in CONVERT_TO_BUILTIN_EXTENSIONS.items():
1596+
if extension not in dirs:
1597+
if entry.get("ignore_missing"):
1598+
continue
1599+
else:
1600+
log("extension not present: %s" % extension)
1601+
sys.exit(1)
1602+
15921603
if static and entry.get("ignore_static"):
15931604
continue
15941605

@@ -1602,8 +1613,6 @@ def collect_python_build_artifacts(
16021613
"sqlite3",
16031614
}
16041615

1605-
dirs = {p for p in os.listdir(intermediates_path)}
1606-
16071616
known_projects = (
16081617
ignore_projects | other_projects | depends_projects | extension_projects
16091618
)

0 commit comments

Comments
 (0)