]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
_auto_deps: tolerate DistributionNotFound (but not VersionConflict), to accomodate...
authorBrian Warner <warner@allmydata.com>
Tue, 29 Jan 2008 20:52:37 +0000 (13:52 -0700)
committerBrian Warner <warner@allmydata.com>
Tue, 29 Jan 2008 20:52:37 +0000 (13:52 -0700)
_auto_deps.py

index 08ff2e771da4c79b41fc183285a1de945f56b08d..97656ba82df573d9b4d417e50ca209eec49b068a 100644 (file)
@@ -18,7 +18,17 @@ def require_auto_deps():
         pass
     else:
         for requirement in install_requires:
-            pkg_resources.require(requirement)
+            try:
+                pkg_resources.require(requirement)
+            except pkg_resources.DistributionNotFound:
+                # there is no .egg-info present for this requirement, which
+                # either means that it isn't installed, or it is installed in
+                # a way that setuptools can't find it (but regular python
+                # might). The __import__ below will pass the second case,
+                # which is good enough for us. There are several
+                # distributions which provide our dependencies just fine, but
+                # they don't ship .egg-info files.
+                pass
     for requirement in install_requires:
         reqparts = requirement.split()
         name = reqparts[0]