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 1ab07f0d..4b2d7854 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -345,8 +345,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 |
