[Checkins] SVN: grokproject/trunk/ The generated project's
bootstrap.py is now freshly downloaded from svn trunk.
Reinout van Rees
reinout at vanrees.org
Sat May 3 08:45:37 EDT 2008
Log message for revision 86203:
The generated project's bootstrap.py is now freshly downloaded from svn trunk.
Changed:
U grokproject/trunk/CHANGES.txt
D grokproject/trunk/grokproject/template/bootstrap.py
A grokproject/trunk/grokproject/template/bootstrap.py_tmpl
U grokproject/trunk/grokproject/templates.py
-=-
Modified: grokproject/trunk/CHANGES.txt
===================================================================
--- grokproject/trunk/CHANGES.txt 2008-05-03 12:26:44 UTC (rev 86202)
+++ grokproject/trunk/CHANGES.txt 2008-05-03 12:45:36 UTC (rev 86203)
@@ -4,6 +4,9 @@
0.8 (unreleased)
------------------
+* Added svn:external for bootstrap/bootstrap.py to the buildout. And we're
+ downloading a fresh one for every grokproject that we're generating.
+
* Add newest=false to the buildout.cfg of grokproject itself.
* If we create a ~/.buildout/default.cfg the download-directory
@@ -15,8 +18,6 @@
the user specified --eggs-dir/eggs_dir on the command line that
will be added to buildout.cfg.
-* Added bootstrap.py to the buildout.
-
* When there is no .buildout/default.cfg file, create it. Only put
eggs_directory in the created buildout.cfg file when the user does
not have it in default.cfg yet.
Deleted: grokproject/trunk/grokproject/template/bootstrap.py
===================================================================
--- grokproject/trunk/grokproject/template/bootstrap.py 2008-05-03 12:26:44 UTC (rev 86202)
+++ grokproject/trunk/grokproject/template/bootstrap.py 2008-05-03 12:45:36 UTC (rev 86203)
@@ -1,55 +0,0 @@
-##############################################################################
-#
-# 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$
-"""
-
-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
-
-cmd = 'from setuptools.command.easy_install import main; main()'
-if sys.platform == 'win32':
- cmd = '"%s"' % cmd # work around spawn lamosity on windows
-
-ws = pkg_resources.working_set
-assert os.spawnle(
- os.P_WAIT, sys.executable, sys.executable,
- '-c', cmd, '-mqNxd', 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)
Added: grokproject/trunk/grokproject/template/bootstrap.py_tmpl
===================================================================
--- grokproject/trunk/grokproject/template/bootstrap.py_tmpl (rev 0)
+++ grokproject/trunk/grokproject/template/bootstrap.py_tmpl 2008-05-03 12:45:36 UTC (rev 86203)
@@ -0,0 +1 @@
+${bootstrap_contents}
Modified: grokproject/trunk/grokproject/templates.py
===================================================================
--- grokproject/trunk/grokproject/templates.py 2008-05-03 12:26:44 UTC (rev 86202)
+++ grokproject/trunk/grokproject/templates.py 2008-05-03 12:45:36 UTC (rev 86203)
@@ -15,8 +15,8 @@
from grokproject.utils import exist_buildout_default_file
VERSIONINFO_INFO_URL = 'http://grok.zope.org/releaseinfo/current'
+BOOTSTRAP = 'http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py'
-
class GrokProject(templates.Template):
_template_dir = 'template'
summary = "A grok project"
@@ -30,8 +30,8 @@
ask_var('newest', 'Check for newer versions of packages',
default='false', should_ask=False,
getter=get_boolean_value_for_option),
- ask_var('run_buildout', "After creating the project area "
- "bootstrap the buildout.",
+ ask_var('run_buildout',
+ "After creating the project area, run the buildout.",
default=True, should_ask=False,
getter=get_boolean_value_for_option),
ask_var('eggs_dir',
@@ -71,6 +71,10 @@
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:
vars['eggs_dir'] = (
@@ -81,7 +85,7 @@
vars['eggs-dir'] = ''
else:
create_buildout_default_file()
-
+
return vars
def post(self, command, output_dir, vars):
More information about the Checkins
mailing list