Mercurial > hg > PaInt
diff paint/package.py @ 21:4df3e715817d
now have passing tests again
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 27 Feb 2012 13:44:52 -0800 |
parents | 11bc01a089e7 |
children | 54c1e7e43a54 |
line wrap: on
line diff
--- a/paint/package.py Mon Feb 27 13:10:18 2012 -0800 +++ b/paint/package.py Mon Feb 27 13:44:52 2012 -0800 @@ -9,6 +9,7 @@ import tarfile import tempfile import urllib2 +import urlparse import utils try: @@ -145,6 +146,7 @@ def dependencies(self): """return the dependencies""" + # get the egg_info directory egg_info = self.egg_info() # read the dependencies @@ -153,4 +155,17 @@ dependencies = [i.strip() for i in file(requires).readlines() if i.strip()] else: dependencies = [] + dependencies = dict([(i, None) for i in dependencies]) + # read the dependency links + dependency_links = os.path.join(egg_info, 'dependency_links.txt') + if os.path.exists(dependency_links): + links = [i.strip() for i in file(dependency_links).readlines() if i.strip()] + for link in links: + # XXX pretty ghetto + assert '#egg=' in link + url, dep = link.split('#egg=', 1) + if dep in dependencies: + dependencies[dep] = link + + return dependencies