Commit 6ca4a3b9 authored by Baiju Muthukadan's avatar Baiju Muthukadan

Use latest bootstrap.py available

(Now support --version option to choose a
 particular version of zc.buildout)
parent b1ecc601
......@@ -17,7 +17,7 @@ Simply run this script in a directory containing a buildout.cfg.
The script accepts buildout command-line options, so you can
use the -c option to specify an alternate configuration file.
$Id: bootstrap.py 90478 2008-08-27 22:44:46Z georgyberdyshev $
$Id: bootstrap.py 102545 2009-08-06 14:49:47Z chrisw $
"""
import os, shutil, sys, tempfile, urllib2
......@@ -49,11 +49,18 @@ else:
cmd = 'from setuptools.command.easy_install import main; main()'
ws = pkg_resources.working_set
if len(sys.argv) > 2 and sys.argv[1] == '--version':
VERSION = '==%s' % sys.argv[2]
args = sys.argv[3:] + ['bootstrap']
else:
VERSION = ''
args = sys.argv[1:] + ['bootstrap']
if is_jython:
import subprocess
assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
quote(tmpeggs), 'zc.buildout'],
assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
quote(tmpeggs), 'zc.buildout' + VERSION],
env=dict(os.environ,
PYTHONPATH=
ws.find(pkg_resources.Requirement.parse('setuptools')).location
......@@ -63,7 +70,7 @@ if is_jython:
else:
assert os.spawnle(
os.P_WAIT, sys.executable, quote (sys.executable),
'-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
'-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout' + VERSION,
dict(os.environ,
PYTHONPATH=
ws.find(pkg_resources.Requirement.parse('setuptools')).location
......@@ -71,7 +78,7 @@ else:
) == 0
ws.add_entry(tmpeggs)
ws.require('zc.buildout')
ws.require('zc.buildout' + VERSION)
import zc.buildout.buildout
zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
zc.buildout.buildout.main(args)
shutil.rmtree(tmpeggs)
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