diff options
author | tarek <none@none> | 2009-08-04 22:01:35 +0200 |
---|---|---|
committer | tarek <none@none> | 2009-08-04 22:01:35 +0200 |
commit | 2c1f443ce376284d1eb45c76be3f39042abcacd4 (patch) | |
tree | f0b88d523d258a8f251578576ef5c662404fd44f | |
parent | d0c8ce2bb66038012426e16fdfbb090ffef28954 (diff) | |
download | external_python_setuptools-2c1f443ce376284d1eb45c76be3f39042abcacd4.tar.gz external_python_setuptools-2c1f443ce376284d1eb45c76be3f39042abcacd4.tar.bz2 external_python_setuptools-2c1f443ce376284d1eb45c76be3f39042abcacd4.zip |
makes sure an installed version of setuptools doesn't get on the way
--HG--
branch : distribute
extra : rebase_source : 3570843b41ad460fae12baebe06dc44dd6bac57b
-rw-r--r-- | buildout/bootstrap.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/buildout/bootstrap.py b/buildout/bootstrap.py index acd1e90f..de143ebd 100644 --- a/buildout/bootstrap.py +++ b/buildout/bootstrap.py @@ -28,13 +28,20 @@ is_jython = sys.platform.startswith('java') try: import pkg_resources + if not hasattr(pkg_resources, '_distribute'): + to_reload = True + raise ImportError + else: + to_reload = False except ImportError: ez = {} exec urllib2.urlopen('http://nightly.ziade.org/bootstraping.py' ).read() in ez ez['use_setuptools'](to_dir=tmpeggs, download_delay=0) - - import pkg_resources + if to_reload: + reload(pkg_resources) + else: + import pkg_resources if sys.platform == 'win32': def quote(c): @@ -83,7 +90,6 @@ else: ws.find(pkg_resources.Requirement.parse('setuptools')).location ), ) == 0 - assert os.spawnle( os.P_WAIT, sys.executable, quote (sys.executable), '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout' + VERSION, |