Commits

Anonymous committed 822d99a

make sure the old api can be called in case of an old version

  • Participants
  • Parent commits ef3923a
  • Branches 0.6-maintenance

Comments (0)

Files changed (1)

File distribute_setup.py

         log.warn('Setuptools or Distribute does not seem to be installed.')
         return
     ws = pkg_resources.working_set
-    setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools',
-                              replacement=False))
+    try:
+        setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools',
+                                  replacement=False))
+    except TypeError:
+        # old distribute API
+        setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools'))
+
     if setuptools_dist is None:
         log.warn('No setuptools distribution found')
         return