[Checkins] SVN: zope.app.recorder/trunk/ - added bootstrap
Christian Theune
ct at gocept.com
Mon May 14 11:48:18 EDT 2007
Log message for revision 75744:
- added bootstrap
- changed tests to work (a bit better) with egg infrastructure
- fixed buildout to actually run
Changed:
_U zope.app.recorder/trunk/
A zope.app.recorder/trunk/bootstrap.py
U zope.app.recorder/trunk/buildout.cfg
U zope.app.recorder/trunk/setup.py
U zope.app.recorder/trunk/src/zope/app/recorder/tests.py
-=-
Property changes on: zope.app.recorder/trunk
___________________________________________________________________
Name: svn:ignore
- develop-eggs
bin
parts
+ eggs
.installed.cfg
develop-eggs
bin
parts
Added: zope.app.recorder/trunk/bootstrap.py
===================================================================
--- zope.app.recorder/trunk/bootstrap.py (rev 0)
+++ zope.app.recorder/trunk/bootstrap.py 2007-05-14 15:48:17 UTC (rev 75744)
@@ -0,0 +1,52 @@
+##############################################################################
+#
+# 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 72703 2007-02-20 11:49:26Z jim $
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+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)
Property changes on: zope.app.recorder/trunk/bootstrap.py
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: zope.app.recorder/trunk/buildout.cfg
===================================================================
--- zope.app.recorder/trunk/buildout.cfg 2007-05-14 15:27:49 UTC (rev 75743)
+++ zope.app.recorder/trunk/buildout.cfg 2007-05-14 15:48:17 UTC (rev 75744)
@@ -8,7 +8,7 @@
[app]
recipe = zc.zope3recipes:app
-eggs = zc.z3monitor
+eggs = zope.app.recorder
servers = zserver
site.zcml =
<include package="zope.app.zcmlfiles" />
@@ -38,21 +38,17 @@
role="zope.Manager"
principal="zope.manager"
/>
- <include package="zc.z3monitor" />
[instance]
recipe = zc.zope3recipes:instance
application = app
zope.conf =
${database:zconfig}
- <product-config zc.z3monitor>
- port 8000
- </product-config>
[database]
recipe = zc.recipe.filestorage
[test]
recipe = zc.recipe.testrunner
-eggs = zc.z3monitor
+eggs = zope.app.recorder
extra-paths = ${zope3:location}/src
Modified: zope.app.recorder/trunk/setup.py
===================================================================
--- zope.app.recorder/trunk/setup.py 2007-05-14 15:27:49 UTC (rev 75743)
+++ zope.app.recorder/trunk/setup.py 2007-05-14 15:48:17 UTC (rev 75744)
@@ -1,13 +1,13 @@
from setuptools import setup, find_packages
setup(
- name = '',
+ name = 'zope.app.recorder',
version = '0.1',
author = 'Jim Fulton',
author_email = 'jim at zope.com',
description = '',
license = 'ZPL 2.1',
-
+
packages = find_packages('src'),
namespace_packages = ['zope', 'zope.app'],
package_dir = {'': 'src'},
Modified: zope.app.recorder/trunk/src/zope/app/recorder/tests.py
===================================================================
--- zope.app.recorder/trunk/src/zope/app/recorder/tests.py 2007-05-14 15:27:49 UTC (rev 75743)
+++ zope.app.recorder/trunk/src/zope/app/recorder/tests.py 2007-05-14 15:48:17 UTC (rev 75744)
@@ -19,12 +19,15 @@
"""
__docformat__ = 'restructuredtext'
+import os.path
import time
import unittest
import transaction
from zope.testing import doctest
from zope.publisher.browser import TestRequest, BrowserView
from zope.app.testing import setup, ztapi
+import zope.app.basicskin
+import zope.app.form
def doctest_RecordingProtocol():
@@ -624,10 +627,12 @@
from zope.app.pagetemplate.simpleviewclass import SimpleViewClass
ztapi.browserView(None, 'standard_macros', StandardMacros)
ztapi.browserView(None, 'view_macros',
- SimpleViewClass("../basicskin/view_macros.pt"))
+ SimpleViewClass(os.path.join(os.path.dirname(zope.app.basicskin.__file__),
+ "view_macros.pt")))
ztapi.browserView(None, 'form_macros', FormMacros)
ztapi.browserView(None, 'widget_macros',
- SimpleViewClass('../form/browser/widget_macros.pt'))
+ SimpleViewClass(os.path.join(os.path.dirname(zope.app.form.__file__),
+ 'browser', 'widget_macros.pt')))
ztapi.browserView(None, 'view_get_menu', ViewGetMenuStub)
More information about the Checkins
mailing list