[Checkins] SVN: grokproject/trunk/ Using hardcoded bootstrap.py
again upon suggestion by Martijn
Reinout van Rees
reinout at vanrees.org
Sat May 17 19:21:08 EDT 2008
Log message for revision 86821:
Using hardcoded bootstrap.py again upon suggestion by Martijn
Changed:
U grokproject/trunk/CHANGES.txt
A grokproject/trunk/grokproject/template/bootstrap.py
D grokproject/trunk/grokproject/template/bootstrap.py_tmpl
U grokproject/trunk/grokproject/templates.py
-=-
Modified: grokproject/trunk/CHANGES.txt
===================================================================
--- grokproject/trunk/CHANGES.txt 2008-05-17 12:28:35 UTC (rev 86820)
+++ grokproject/trunk/CHANGES.txt 2008-05-17 23:21:06 UTC (rev 86821)
@@ -4,6 +4,9 @@
0.8 (unreleased)
------------------
+* Using hardcoded bootstrap.py again instead of downloading the current trunk
+ revision upon each grokproject run, which is potentially dangerous.
+
* Temporarily added find-links again as it is needed to find zope.tal
3.4.0b1 which was never released on the cheeseshop.
Added: grokproject/trunk/grokproject/template/bootstrap.py
===================================================================
--- grokproject/trunk/grokproject/template/bootstrap.py (rev 0)
+++ grokproject/trunk/grokproject/template/bootstrap.py 2008-05-17 23:21:06 UTC (rev 86821)
@@ -0,0 +1,62 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+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 85041 2008-03-31 15:57:30Z andreasjung $
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+try:
+ import pkg_resources
+except ImportError:
+ ez = {}
+ exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+ import pkg_resources
+
+if sys.platform == 'win32':
+ def quote(c):
+ if ' ' in c:
+ return '"%s"' % c # work around spawn lamosity on windows
+ else:
+ return c
+else:
+ def quote (c):
+ return c
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+ws = pkg_resources.working_set
+assert os.spawnle(
+ os.P_WAIT, sys.executable, quote (sys.executable),
+ '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)
Property changes on: grokproject/trunk/grokproject/template/bootstrap.py
___________________________________________________________________
Name: svn:eol-style
+ native
Deleted: grokproject/trunk/grokproject/template/bootstrap.py_tmpl
===================================================================
--- grokproject/trunk/grokproject/template/bootstrap.py_tmpl 2008-05-17 12:28:35 UTC (rev 86820)
+++ grokproject/trunk/grokproject/template/bootstrap.py_tmpl 2008-05-17 23:21:06 UTC (rev 86821)
@@ -1 +0,0 @@
-${bootstrap_contents}
Modified: grokproject/trunk/grokproject/templates.py
===================================================================
--- grokproject/trunk/grokproject/templates.py 2008-05-17 12:28:35 UTC (rev 86820)
+++ grokproject/trunk/grokproject/templates.py 2008-05-17 23:21:06 UTC (rev 86821)
@@ -19,7 +19,6 @@
from grokproject.utils import install_grok
GROK_RELEASE_URL = 'http://grok.zope.org/releaseinfo/'
-BOOTSTRAP = 'http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py'
class GrokProject(templates.Template):
_template_dir = 'template'
@@ -76,10 +75,6 @@
version_info_file_contents = urllib.urlopen(version_info_url).read()
vars['version_info_file_contents'] = version_info_file_contents
- # Handling the bootstrap.py file.
- bootstrap_contents = urllib.urlopen(BOOTSTRAP).read()
- vars['bootstrap_contents'] = bootstrap_contents
-
buildout_default = exist_buildout_default_file()
if explicit_eggs_dir:
# Put explicit_eggs_dir in the vars; used by the post command.
More information about the Checkins
mailing list