Skip to content
Snippets Groups Projects
Unverified Commit e98728ab authored by Miss Islington (bot)'s avatar Miss Islington (bot) Committed by GitHub
Browse files

gh-93939: Use new MODULE_name_STATE in wasm_assets script (GH-95035)


(cherry picked from commit 0f34c7e2)

Co-authored-by: default avatarChristian Heimes <christian@python.org>
parent 84d58ad1
Branches
Tags
No related merge requests found
...@@ -175,14 +175,13 @@ def detect_extension_modules(args: argparse.Namespace): ...@@ -175,14 +175,13 @@ def detect_extension_modules(args: argparse.Namespace):
loc = {} loc = {}
exec(data, globals(), loc) exec(data, globals(), loc)
for name, value in loc["build_time_vars"].items(): for key, value in loc["build_time_vars"].items():
if value not in {"yes", "missing", "disabled", "n/a"}: if not key.startswith("MODULE_") or not key.endswith("_STATE"):
continue continue
if not name.startswith("MODULE_"): if value not in {"yes", "disabled", "missing", "n/a"}:
continue raise ValueError(f"Unsupported value '{value}' for {key}")
if name.endswith(("_CFLAGS", "_DEPS", "_LDFLAGS")):
continue modname = key[7:-6].lower()
modname = name.removeprefix("MODULE_").lower()
if modname not in modules: if modname not in modules:
modules[modname] = value == "yes" modules[modname] = value == "yes"
return modules return modules
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment