mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
gh-93939: Use new MODULE_name_STATE in wasm_assets script (GH-95035)
(cherry picked from commit 0f34c7e2d3
)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
84d58ad17b
commit
e98728ab4d
1 changed files with 6 additions and 7 deletions
|
@ -175,14 +175,13 @@ def detect_extension_modules(args: argparse.Namespace):
|
|||
loc = {}
|
||||
exec(data, globals(), loc)
|
||||
|
||||
for name, value in loc["build_time_vars"].items():
|
||||
if value not in {"yes", "missing", "disabled", "n/a"}:
|
||||
for key, value in loc["build_time_vars"].items():
|
||||
if not key.startswith("MODULE_") or not key.endswith("_STATE"):
|
||||
continue
|
||||
if not name.startswith("MODULE_"):
|
||||
continue
|
||||
if name.endswith(("_CFLAGS", "_DEPS", "_LDFLAGS")):
|
||||
continue
|
||||
modname = name.removeprefix("MODULE_").lower()
|
||||
if value not in {"yes", "disabled", "missing", "n/a"}:
|
||||
raise ValueError(f"Unsupported value '{value}' for {key}")
|
||||
|
||||
modname = key[7:-6].lower()
|
||||
if modname not in modules:
|
||||
modules[modname] = value == "yes"
|
||||
return modules
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue