@@ -249,7 +249,7 @@ def discover_namespace(package_root_path: str) -> Optional[str]:
249
249
250
250
def _set_root_namespace (init_file_path : str , module_name : str ) -> Optional [str ]:
251
251
"""
252
- Examine an __init__.py file to determine if it represents a substantial namespace
252
+ Examine an __init__.py file to determine if it represents a substantial namespace
253
253
or is just a namespace extension file.
254
254
255
255
:param str init_file_path: Path to the __init__.py file
@@ -327,7 +327,7 @@ def __init__(
327
327
@classmethod
328
328
def from_path (cls , parse_directory_or_file : str ):
329
329
"""
330
- Creates a new ParsedSetup instance from a path to a setup.py, pyproject.toml (with [project] member),
330
+ Creates a new ParsedSetup instance from a path to a setup.py, pyproject.toml (with [project] member),
331
331
or a directory containing either of those files.
332
332
"""
333
333
(
@@ -373,6 +373,18 @@ def get_config_setting(self, setting: str, default: Any = True) -> Any:
373
373
def is_reporting_suppressed (self , setting : str ) -> bool :
374
374
return compare_string_to_glob_array (setting , self .get_config_setting ("suppressed_skip_warnings" , []))
375
375
376
+ def __str__ (self ):
377
+ lines = [f"ParsedSetup from { self .folder } " ]
378
+ for attr in [
379
+ "name" , "version" , "python_requires" , "requires" , "is_new_sdk" ,
380
+ "setup_filename" , "namespace" , "package_data" , "include_package_data" ,
381
+ "classifiers" , "keywords" , "ext_package" , "ext_modules" ,
382
+ "is_metapackage" , "is_pyproject"
383
+ ]:
384
+ value = getattr (self , attr )
385
+ lines .append (f"\t { attr } ={ value } " )
386
+ return "\n " .join (lines )
387
+
376
388
377
389
def update_build_config (package_path : str , new_build_config : Dict [str , Any ]) -> Dict [str , Any ]:
378
390
"""
@@ -693,7 +705,7 @@ def get_version_py(setup_path: str) -> Optional[str]:
693
705
694
706
# Find path to _version.py recursively
695
707
for root , dirs , files in os .walk (file_path ):
696
- dirs [:] = [d for d in dirs if d not in EXCLUDE and not d .endswith (".egg-info" )]
708
+ dirs [:] = [d for d in dirs if d not in EXCLUDE and not d .endswith (".egg-info" ) and not d . startswith ( "." ) ]
697
709
698
710
if VERSION_PY in files :
699
711
return os .path .join (root , VERSION_PY )
0 commit comments