[Zope-Checkins] SVN: Zope/trunk/bootstrap.py Use latest bootstrap.py available
Baiju M
baiju.m.mail at gmail.com
Tue Oct 13 04:53:47 EDT 2009
Log message for revision 105030:
Use latest bootstrap.py available
(Now support --version option to choose a
particular version of zc.buildout)
Changed:
U Zope/trunk/bootstrap.py
-=-
Modified: Zope/trunk/bootstrap.py
===================================================================
--- Zope/trunk/bootstrap.py 2009-10-13 08:42:59 UTC (rev 105029)
+++ Zope/trunk/bootstrap.py 2009-10-13 08:53:46 UTC (rev 105030)
@@ -17,7 +17,7 @@
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 @@
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 @@
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 @@
) == 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)
More information about the Zope-Checkins
mailing list