Commit 0f267465 authored by tarek's avatar tarek

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

--HG--
branch : distribute
extra : rebase_source : 60119a660b567b7ba04f6ceae08900e7b7abbf60
parent 23229041
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment