don't try to parse empty install_requires
This commit is contained in:
parent
8aad03dbc7
commit
8abba0bd7f
|
|
@ -48,18 +48,18 @@ class get_metadata(Command):
|
|||
# end if
|
||||
|
||||
final_deps = []
|
||||
for dep in pkg_resources.parse_requirements(self.distribution.install_requires):
|
||||
# add all defined specs to the dependecy list separately.
|
||||
if dep.specs:
|
||||
for operator, version in dep.specs:
|
||||
final_deps.append("%s %s %s" % (
|
||||
dep.project_name,
|
||||
"=" if operator == "==" else operator,
|
||||
version
|
||||
))
|
||||
else:
|
||||
final_deps.append(dep.project_name)
|
||||
|
||||
if self.distribution.install_requires:
|
||||
for dep in pkg_resources.parse_requirements(self.distribution.install_requires):
|
||||
# add all defined specs to the dependecy list separately.
|
||||
if dep.specs:
|
||||
for operator, version in dep.specs:
|
||||
final_deps.append("%s %s %s" % (
|
||||
dep.project_name,
|
||||
"=" if operator == "==" else operator,
|
||||
version
|
||||
))
|
||||
else:
|
||||
final_deps.append(dep.project_name)
|
||||
|
||||
data["dependencies"] = final_deps
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue