[Checkins] SVN: z3c.livesearch/trunk/ - added buildout
Michael Howitz
mh at gocept.com
Sat Jun 26 07:15:06 EDT 2010
Log message for revision 113884:
- added buildout
- added test infra structure
- noted down package dependencies
- removed ZPKG and ZCML slugs
- updated ftesting.zmcl to run with current package versions
- tried to get tests running but failed because of missing infrastructure, it seems that the tests have never run successfully
Changed:
_U z3c.livesearch/trunk/
A z3c.livesearch/trunk/bootstrap.py
A z3c.livesearch/trunk/buildout.cfg
D z3c.livesearch/trunk/setup.cfg
U z3c.livesearch/trunk/setup.py
D z3c.livesearch/trunk/src/z3c/livesearch/SETUP.cfg
U z3c.livesearch/trunk/src/z3c/livesearch/browser.py
U z3c.livesearch/trunk/src/z3c/livesearch/ftesting.zcml
A z3c.livesearch/trunk/src/z3c/livesearch/tests.py
D z3c.livesearch/trunk/src/z3c/livesearch/z3c.livesearch-configure.zcml
-=-
Property changes on: z3c.livesearch/trunk
___________________________________________________________________
Added: svn:ignore
+ develop-eggs
bin
parts
.installed.cfg
Copied: z3c.livesearch/trunk/bootstrap.py (from rev 113792, zc.buildout/trunk/bootstrap/bootstrap.py)
===================================================================
--- z3c.livesearch/trunk/bootstrap.py (rev 0)
+++ z3c.livesearch/trunk/bootstrap.py 2010-06-26 11:15:06 UTC (rev 113884)
@@ -0,0 +1,118 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Foundation 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 105417 2009-11-01 15:15:20Z tarek $
+"""
+
+import os, shutil, sys, tempfile, urllib2
+from optparse import OptionParser
+
+tmpeggs = tempfile.mkdtemp()
+
+is_jython = sys.platform.startswith('java')
+
+# parsing arguments
+parser = OptionParser()
+parser.add_option("-v", "--version", dest="version",
+ help="use a specific zc.buildout version")
+parser.add_option("-d", "--distribute",
+ action="store_true", dest="distribute", default=False,
+ help="Use Disribute rather than Setuptools.")
+
+parser.add_option("-c", None, action="store", dest="config_file",
+ help=("Specify the path to the buildout configuration "
+ "file to be used."))
+
+options, args = parser.parse_args()
+
+# if -c was provided, we push it back into args for buildout' main function
+if options.config_file is not None:
+ args += ['-c', options.config_file]
+
+if options.version is not None:
+ VERSION = '==%s' % options.version
+else:
+ VERSION = ''
+
+USE_DISTRIBUTE = options.distribute
+args = args + ['bootstrap']
+
+try:
+ import pkg_resources
+ import setuptools
+ if not hasattr(pkg_resources, '_distribute'):
+ raise ImportError
+except ImportError:
+ ez = {}
+ if USE_DISTRIBUTE:
+ exec urllib2.urlopen('http://python-distribute.org/distribute_setup.py'
+ ).read() in ez
+ ez['use_setuptools'](to_dir=tmpeggs, download_delay=0, no_fake=True)
+ else:
+ exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+ reload(sys.modules['pkg_resources'])
+ 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
+
+if USE_DISTRIBUTE:
+ requirement = 'distribute'
+else:
+ requirement = 'setuptools'
+
+if is_jython:
+ import subprocess
+
+ assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
+ quote(tmpeggs), 'zc.buildout' + VERSION],
+ env=dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse(requirement)).location
+ ),
+ ).wait() == 0
+
+else:
+ assert os.spawnle(
+ os.P_WAIT, sys.executable, quote (sys.executable),
+ '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout' + VERSION,
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse(requirement)).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout' + VERSION)
+import zc.buildout.buildout
+zc.buildout.buildout.main(args)
+shutil.rmtree(tmpeggs)
Added: z3c.livesearch/trunk/buildout.cfg
===================================================================
--- z3c.livesearch/trunk/buildout.cfg (rev 0)
+++ z3c.livesearch/trunk/buildout.cfg 2010-06-26 11:15:06 UTC (rev 113884)
@@ -0,0 +1,10 @@
+[buildout]
+parts = test
+develop = .
+
+# not yet released on pypi
+find-links = http://code.google.com/p/z3c-javascript/
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = z3c.livesearch [test]
\ No newline at end of file
Deleted: z3c.livesearch/trunk/setup.cfg
===================================================================
--- z3c.livesearch/trunk/setup.cfg 2010-06-26 11:04:28 UTC (rev 113883)
+++ z3c.livesearch/trunk/setup.cfg 2010-06-26 11:15:06 UTC (rev 113884)
@@ -1,3 +0,0 @@
-[egg_info]
-tag_build = .dev
-tag_svn_revision = 1
Modified: z3c.livesearch/trunk/setup.py
===================================================================
--- z3c.livesearch/trunk/setup.py 2010-06-26 11:04:28 UTC (rev 113883)
+++ z3c.livesearch/trunk/setup.py 2010-06-26 11:15:06 UTC (rev 113884)
@@ -19,4 +19,20 @@
package_dir = {'':'src'},
namespace_packages = ['z3c'],
zip_safe=False,
+ install_requires = [
+ 'setuptools',
+ 'zc.resourcelibrary',
+ 'zope.app.catalog',
+ 'zope.app.intid',
+ 'z3c.javascript',
+ ],
+ extras_require = {
+ 'test': [
+ 'z3c.sampledata',
+ 'zope.app.keyreference',
+ 'zope.app.testing',
+ 'zope.app.zcmlfiles',
+ 'zope.app.zptpage',
+ ],
+ }
)
Deleted: z3c.livesearch/trunk/src/z3c/livesearch/SETUP.cfg
===================================================================
--- z3c.livesearch/trunk/src/z3c/livesearch/SETUP.cfg 2010-06-26 11:04:28 UTC (rev 113883)
+++ z3c.livesearch/trunk/src/z3c/livesearch/SETUP.cfg 2010-06-26 11:15:06 UTC (rev 113884)
@@ -1,3 +0,0 @@
-<data-files zopeskel/etc/package-includes>
- z3c.livesearch-*.zcml
-</data-files>
Modified: z3c.livesearch/trunk/src/z3c/livesearch/browser.py
===================================================================
--- z3c.livesearch/trunk/src/z3c/livesearch/browser.py 2010-06-26 11:04:28 UTC (rev 113883)
+++ z3c.livesearch/trunk/src/z3c/livesearch/browser.py 2010-06-26 11:15:06 UTC (rev 113884)
@@ -3,7 +3,7 @@
from zope.traversing.browser.absoluteurl import absoluteURL
from zope.app.catalog.interfaces import ICatalog
from zope.app.intid.interfaces import IIntIds
-from zope.app.zapi import getUtility
+from zope.component import getUtility
try:
from zc import resourcelibrary
Modified: z3c.livesearch/trunk/src/z3c/livesearch/ftesting.zcml
===================================================================
--- z3c.livesearch/trunk/src/z3c/livesearch/ftesting.zcml 2010-06-26 11:04:28 UTC (rev 113883)
+++ z3c.livesearch/trunk/src/z3c/livesearch/ftesting.zcml 2010-06-26 11:15:06 UTC (rev 113884)
@@ -2,14 +2,16 @@
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:meta="http://namespaces.zope.org/meta"
i18n_domain="zope">
- <include package="zope.app" />
- <include package="zope.app.server" />
+
+ <include package="zope.app.zcmlfiles" />
<include package="zope.app.authentication" />
- <include package="zope.app.securitypolicy" file="meta.zcml" />
+ <include package="zope.securitypolicy" file="meta.zcml" />
<securityPolicy
- component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
- <include package="zope.app.securitypolicy" />
+ component="zope.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+ <include package="zope.login" />
+ <include package="zope.password" />
+
<include package="zope.formlib"/>
<include package="zope.app.catalog" />
<include package="zope.app.intid" />
@@ -19,8 +21,8 @@
<!-- Turn on the devmode which is needed for sample data generation -->
<meta:provides feature="devmode" />
-
-
+
+
<include package="z3c.sampledata" file="meta.zcml"/>
<include package="z3c.sampledata"/>
<include package="zc.resourcelibrary" file="meta.zcml"/>
@@ -40,7 +42,7 @@
title="Administrator"
login="mgr"
password="mgrpw" />
-
+
<grant
role="zope.Manager"
principal="zope.manager"
Added: z3c.livesearch/trunk/src/z3c/livesearch/tests.py
===================================================================
--- z3c.livesearch/trunk/src/z3c/livesearch/tests.py (rev 0)
+++ z3c.livesearch/trunk/src/z3c/livesearch/tests.py 2010-06-26 11:15:06 UTC (rev 113884)
@@ -0,0 +1,28 @@
+##############################################################################
+#
+# Copyright (c) 2010 Zope Foundation 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.
+#
+##############################################################################
+
+import doctest
+import os.path
+import zope.app.testing.functional
+
+
+Layer = zope.app.testing.functional.ZCMLLayer(
+ os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+ __name__, 'z3c.livesearch-layer', allow_teardown=True)
+
+
+def test_suite():
+ suite = doctest.DocFileSuite('README.txt')
+ suite.layer = Layer
+ return suite
Property changes on: z3c.livesearch/trunk/src/z3c/livesearch/tests.py
___________________________________________________________________
Added: svn:keywords
+ Id Rev Date
Added: svn:eol-style
+ native
Deleted: z3c.livesearch/trunk/src/z3c/livesearch/z3c.livesearch-configure.zcml
===================================================================
--- z3c.livesearch/trunk/src/z3c/livesearch/z3c.livesearch-configure.zcml 2010-06-26 11:04:28 UTC (rev 113883)
+++ z3c.livesearch/trunk/src/z3c/livesearch/z3c.livesearch-configure.zcml 2010-06-26 11:15:06 UTC (rev 113884)
@@ -1 +0,0 @@
-<include package="z3c.livesearch"/>
\ No newline at end of file
More information about the checkins
mailing list