diff options
author | tarek <none@none> | 2009-10-15 23:30:55 +0200 |
---|---|---|
committer | tarek <none@none> | 2009-10-15 23:30:55 +0200 |
commit | 0f267465f3a0584dafc96a414dfe3338b9bbda73 (patch) | |
tree | 0d05ed0415b0abc5333e83fea8b27c55c6397dbd /distribute_setup.py | |
parent | 23229041ce73c90615ecefa80a720da785cd54cd (diff) | |
download | external_python_setuptools-0f267465f3a0584dafc96a414dfe3338b9bbda73.tar.gz external_python_setuptools-0f267465f3a0584dafc96a414dfe3338b9bbda73.tar.bz2 external_python_setuptools-0f267465f3a0584dafc96a414dfe3338b9bbda73.zip |
make sure the old api can be called in case of an old version
--HG--
branch : distribute
extra : rebase_source : 60119a660b567b7ba04f6ceae08900e7b7abbf60
Diffstat (limited to 'distribute_setup.py')
-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 |