diff options
-rw-r--r-- | distribute_setup.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/distribute_setup.py b/distribute_setup.py index 7023b596..72853356 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -349,8 +349,13 @@ def fake_setuptools(): 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 |