mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-18851 Fixed: RequirementParseError: Invalid requirement, parse error at ... for packages with broken requiremnts
Some setuptools versions throws RequirementParseError while getting package dependencies
This commit is contained in:
@@ -46,7 +46,11 @@ def do_list():
|
||||
except ImportError:
|
||||
error("Python packaging tool 'setuptools' not found", ERROR_NO_SETUPTOOLS)
|
||||
for pkg in pkg_resources.working_set:
|
||||
requires = ':'.join([str(x) for x in pkg.requires()])
|
||||
try:
|
||||
requirements = pkg.requires()
|
||||
except Exception:
|
||||
requirements = []
|
||||
requires = ':'.join([str(x) for x in requirements])
|
||||
sys.stdout.write('\t'.join([pkg.project_name, pkg.version, pkg.location, requires])+chr(10))
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user