@@ -251,25 +251,29 @@ def __init__(
251
251
ignore_option_errors ,
252
252
ensure_discovered : expand .EnsurePackagesDiscovered ,
253
253
):
254
+ self .ignore_option_errors = ignore_option_errors
255
+ self .target_obj = target_obj
256
+ self .sections = self ._section_options (options )
257
+ self .set_options : List [str ] = []
258
+ self .ensure_discovered = ensure_discovered
259
+ self ._referenced_files : Set [str ] = set ()
260
+ """After parsing configurations, this property will enumerate
261
+ all files referenced by the "file:" directive. Private API for setuptools only.
262
+ """
263
+
264
+ @classmethod
265
+ def _section_options (cls , options : AllCommandOptions ):
254
266
sections : AllCommandOptions = {}
255
267
256
- section_prefix = self .section_prefix
268
+ section_prefix = cls .section_prefix
257
269
for section_name , section_options in options .items ():
258
270
if not section_name .startswith (section_prefix ):
259
271
continue
260
272
261
273
section_name = section_name .replace (section_prefix , '' ).strip ('.' )
262
274
sections [section_name ] = section_options
263
275
264
- self .ignore_option_errors = ignore_option_errors
265
- self .target_obj = target_obj
266
- self .sections = sections
267
- self .set_options : List [str ] = []
268
- self .ensure_discovered = ensure_discovered
269
- self ._referenced_files : Set [str ] = set ()
270
- """After parsing configurations, this property will enumerate
271
- all files referenced by the "file:" directive. Private API for setuptools only.
272
- """
276
+ return sections
273
277
274
278
@property
275
279
def parsers (self ):
0 commit comments