don't try to parse empty install_requires

This commit is contained in:
Lars van de Kerkhof 2012-04-13 12:20:57 +02:00
parent 8aad03dbc7
commit 8abba0bd7f
1 changed files with 12 additions and 12 deletions

View File

@ -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