File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -165,14 +165,13 @@ def detect_extension_modules(args: argparse.Namespace):
165165 loc = {}
166166 exec (data , globals (), loc )
167167
168- for name , value in loc ["build_time_vars" ].items ():
169- if value not in { "yes" , "missing" , "disabled" , "n/a" } :
168+ for key , value in loc ["build_time_vars" ].items ():
169+ if not key . startswith ( "MODULE_" ) or not key . endswith ( "_STATE" ) :
170170 continue
171- if not name .startswith ("MODULE_" ):
172- continue
173- if name .endswith (("_CFLAGS" , "_DEPS" , "_LDFLAGS" )):
174- continue
175- modname = name .removeprefix ("MODULE_" ).lower ()
171+ if value not in {"yes" , "disabled" , "missing" , "n/a" }:
172+ raise ValueError (f"Unsupported value '{ value } ' for { key } " )
173+
174+ modname = key [7 :- 6 ].lower ()
176175 if modname not in modules :
177176 modules [modname ] = value == "yes"
178177 return modules
You can’t perform that action at this time.
0 commit comments