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 @@ -175,14 +175,13 @@ def detect_extension_modules(args: argparse.Namespace):
175175 loc = {}
176176 exec (data , globals (), loc )
177177
178- for name , value in loc ["build_time_vars" ].items ():
179- if value not in { "yes" , "missing" , "disabled" , "n/a" } :
178+ for key , value in loc ["build_time_vars" ].items ():
179+ if not key . startswith ( "MODULE_" ) or not key . endswith ( "_STATE" ) :
180180 continue
181- if not name .startswith ("MODULE_" ):
182- continue
183- if name .endswith (("_CFLAGS" , "_DEPS" , "_LDFLAGS" )):
184- continue
185- modname = name .removeprefix ("MODULE_" ).lower ()
181+ if value not in {"yes" , "disabled" , "missing" , "n/a" }:
182+ raise ValueError (f"Unsupported value '{ value } ' for { key } " )
183+
184+ modname = key [7 :- 6 ].lower ()
186185 if modname not in modules :
187186 modules [modname ] = value == "yes"
188187 return modules
You can’t perform that action at this time.
0 commit comments