]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
setup: remove the try: except: around the import of pkg_resources -- we now require...
authorZooko O'Whielacronx <zooko@zooko.com>
Fri, 18 Apr 2008 20:24:59 +0000 (13:24 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Fri, 18 Apr 2008 20:24:59 +0000 (13:24 -0700)
_auto_deps.py

index 78b040bc512e1ef4f9eba36a6caff5f4d40954ad..dcff02fc4f76f4f6336d863926fe6ab0337a1edf 100644 (file)
@@ -14,26 +14,17 @@ if hasattr(sys, 'frozen'):
     install_requires=[]
 
 def require_auto_deps():
-    try:
-        import pkg_resources
-    except:
-        # Then we can't assert that the versions of these packages are the right
-        # versions, but we can still try to use them anyway...
-        pass
-    else:
-        for requirement in install_requires:
-            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 pkg_resources can't find it (but regular python
-                # might).  There are several older Linux distributions which
-                # provide our dependencies just fine, but they don't ship
-                # .egg-info files. Note that if there *is* an .egg-info file,
-                # but it shows a too-old version, then we'll get a
-                # VersionConflict error instead of DistributionNotFound.
-                pass
-
-if __name__ == "__main__":
-    require_auto_deps()
+    import pkg_resources
+    for requirement in install_requires:
+        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 pkg_resources can't find it (but regular python
+            # might).  There are several older Linux distributions which
+            # provide our dependencies just fine, but they don't ship
+            # .egg-info files. Note that if there *is* an .egg-info file,
+            # but it shows a too-old version, then we'll get a
+            # VersionConflict error instead of DistributionNotFound.
+            pass