[Checkins] SVN: five.localsitemanager/trunk/ added buildout
Michael Howitz
mh at gocept.com
Mon Aug 25 08:32:03 EDT 2008
Log message for revision 90197:
added buildout
Changed:
_U five.localsitemanager/trunk/
A five.localsitemanager/trunk/bootstrap.py
A five.localsitemanager/trunk/buildout.cfg
-=-
Property changes on: five.localsitemanager/trunk
___________________________________________________________________
Name: svn:ignore
- build
dist
*.egg-info
*.pyc
+ build
dist
*.egg-info
*.pyc
develop-eggs
bin
parts
downloads
.installed.cfg
Added: five.localsitemanager/trunk/bootstrap.py
===================================================================
--- five.localsitemanager/trunk/bootstrap.py (rev 0)
+++ five.localsitemanager/trunk/bootstrap.py 2008-08-25 12:32:02 UTC (rev 90197)
@@ -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$
+"""
+
+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: five.localsitemanager/trunk/bootstrap.py
___________________________________________________________________
Name: svn:keywords
+ Id Rev Date
Name: svn:eol-style
+ native
Added: five.localsitemanager/trunk/buildout.cfg
===================================================================
--- five.localsitemanager/trunk/buildout.cfg (rev 0)
+++ five.localsitemanager/trunk/buildout.cfg 2008-08-25 12:32:02 UTC (rev 90197)
@@ -0,0 +1,13 @@
+[buildout]
+parts = zope2 test
+develop = .
+
+# XXX needed until zope2 is fully eggified (there is no egg for OFS)
+[zope2]
+recipe = plone.recipe.zope2install
+url = http://www.zope.org/Products/Zope/2.11.1/Zope-2.11.1-final.tgz
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = five.localsitemanager
+extra-paths = parts/zope2/lib/python
\ No newline at end of file
More information about the Checkins
mailing list