Skip to content

Commit

Permalink
don't try to parse empty install_requires
Browse files Browse the repository at this point in the history
  • Loading branch information
specialunderwear committed Apr 13, 2012
1 parent 0f19c1b commit 4561429
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions lib/fpm/package/pyfpm/get_metadata.py
Expand Up @@ -48,18 +48,18 @@ def run(self):
# 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

Expand Down

0 comments on commit 4561429

Please sign in to comment.