[Checkins] SVN: z3c.testing/trunk/ buildoutification, eggification
Bernd Dorn
bernd.dorn at lovelysystems.com
Thu Mar 29 06:17:53 EDT 2007
Log message for revision 73902:
buildoutification, eggification
Changed:
_U z3c.testing/trunk/
A z3c.testing/trunk/bootstrap.py
A z3c.testing/trunk/buildout.cfg
A z3c.testing/trunk/setup.cfg
A z3c.testing/trunk/setup.py
U z3c.testing/trunk/src/z3c/testing/app.py
U z3c.testing/trunk/src/z3c/testing/layer.py
U z3c.testing/trunk/src/z3c/testing/test.zcml
U z3c.testing/trunk/src/z3c/testing/verify.py
-=-
Property changes on: z3c.testing/trunk
___________________________________________________________________
Name: svn:ignore
+ bin
build
dist
lib
develop-eggs
eggs
parts
.installed.cfg
Added: z3c.testing/trunk/bootstrap.py
===================================================================
--- z3c.testing/trunk/bootstrap.py 2007-03-29 09:37:31 UTC (rev 73901)
+++ z3c.testing/trunk/bootstrap.py 2007-03-29 10:17:53 UTC (rev 73902)
@@ -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$
+"""
+
+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: z3c.testing/trunk/bootstrap.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: z3c.testing/trunk/buildout.cfg
===================================================================
--- z3c.testing/trunk/buildout.cfg 2007-03-29 09:37:31 UTC (rev 73901)
+++ z3c.testing/trunk/buildout.cfg 2007-03-29 10:17:53 UTC (rev 73902)
@@ -0,0 +1,10 @@
+[buildout]
+develop = .
+parts = test
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = z3c.testing
+
+
+
Property changes on: z3c.testing/trunk/buildout.cfg
___________________________________________________________________
Name: svn:eol-style
+ native
Added: z3c.testing/trunk/setup.cfg
===================================================================
--- z3c.testing/trunk/setup.cfg 2007-03-29 09:37:31 UTC (rev 73901)
+++ z3c.testing/trunk/setup.cfg 2007-03-29 10:17:53 UTC (rev 73902)
@@ -0,0 +1,2 @@
+[egg_info]
+tag_svn_revision = 1
Property changes on: z3c.testing/trunk/setup.cfg
___________________________________________________________________
Name: svn:eol-style
+ native
Added: z3c.testing/trunk/setup.py
===================================================================
--- z3c.testing/trunk/setup.py 2007-03-29 09:37:31 UTC (rev 73901)
+++ z3c.testing/trunk/setup.py 2007-03-29 10:17:53 UTC (rev 73902)
@@ -0,0 +1,31 @@
+#!python
+from setuptools import setup, find_packages
+
+setup(name='z3c.testing',
+ version='0.1',
+ author = "Zope Community",
+ author_email = "zope3-dev at zope.org",
+ description = "Test Helpers for Zope3",
+ license = "ZPL 2.1",
+ keywords = "zope zope3 testing",
+ url='http://svn.zope.org/z3c.testing',
+ zip_safe=False,
+ packages=find_packages('src'),
+ include_package_data=True,
+ package_dir = {'':'src'},
+ namespace_packages=['z3c',],
+ install_requires = ['setuptools',
+ 'ZODB3',
+ 'zope.app.appsetup',
+ 'zope.app.container',
+ 'zope.app.folder',
+ 'zope.app.publication',
+ 'zope.app.security',
+ 'zope.app.testing',
+ 'zope.component',
+ 'zope.configuration',
+ 'zope.interface',
+ 'zope.testing',
+ ],
+ )
+
Property changes on: z3c.testing/trunk/setup.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Modified: z3c.testing/trunk/src/z3c/testing/app.py
===================================================================
--- z3c.testing/trunk/src/z3c/testing/app.py 2007-03-29 09:37:31 UTC (rev 73901)
+++ z3c.testing/trunk/src/z3c/testing/app.py 2007-03-29 10:17:53 UTC (rev 73902)
@@ -15,7 +15,6 @@
$Id$
"""
-import sys
import unittest
Modified: z3c.testing/trunk/src/z3c/testing/layer.py
===================================================================
--- z3c.testing/trunk/src/z3c/testing/layer.py 2007-03-29 09:37:31 UTC (rev 73901)
+++ z3c.testing/trunk/src/z3c/testing/layer.py 2007-03-29 10:17:53 UTC (rev 73902)
@@ -20,15 +20,11 @@
"""
__docformat__ = "reStructuredText"
-import unittest
import os
import transaction
import shutil
from ZODB.FileStorage import FileStorage
-from zope import component
-from zope import schema
-
from zope.app.appsetup import database
from zope.app.testing import functional
from zope.app.publication.zopepublication import ZopePublication
Modified: z3c.testing/trunk/src/z3c/testing/test.zcml
===================================================================
--- z3c.testing/trunk/src/z3c/testing/test.zcml 2007-03-29 09:37:31 UTC (rev 73901)
+++ z3c.testing/trunk/src/z3c/testing/test.zcml 2007-03-29 10:17:53 UTC (rev 73902)
@@ -1,4 +1,10 @@
<configure xmlns="http://namespaces.zope.org/zope">
- <include package="zope.app"/>
-
-</configure>
\ No newline at end of file
+ <include
+ zcml:condition="installed zope.app.zcmlfiles"
+ package="zope.app.zcmlfiles"
+ />
+ <include
+ zcml:condition="not-installed zope.app.zcmlfiles"
+ package="zope.app"
+ />
+</configure>
Modified: z3c.testing/trunk/src/z3c/testing/verify.py
===================================================================
--- z3c.testing/trunk/src/z3c/testing/verify.py 2007-03-29 09:37:31 UTC (rev 73901)
+++ z3c.testing/trunk/src/z3c/testing/verify.py 2007-03-29 10:17:53 UTC (rev 73902)
@@ -17,7 +17,7 @@
"""
from zope.interface.exceptions import BrokenImplementation, DoesNotImplement
from zope.interface.exceptions import BrokenMethodImplementation
-from types import FunctionType, MethodType
+from types import FunctionType
from zope.interface.interface import fromMethod, fromFunction, Method
from zope.interface.verify import _incompat, MethodTypes
More information about the Checkins
mailing list