[Checkins] SVN: five.customerize/trunk/ Package metadata cleanup and provide a buildout configuration for testing the package on its own.
Hanno Schlichting
hannosch at hannosch.eu
Sun Jun 13 06:21:27 EDT 2010
Log message for revision 113409:
Package metadata cleanup and provide a buildout configuration for testing the package on its own.
Changed:
U five.customerize/trunk/CHANGES.txt
U five.customerize/trunk/INSTALL.txt
A five.customerize/trunk/bootstrap.py
A five.customerize/trunk/buildout.cfg
U five.customerize/trunk/src/five/__init__.py
D five.customerize/trunk/test.py
-=-
Modified: five.customerize/trunk/CHANGES.txt
===================================================================
--- five.customerize/trunk/CHANGES.txt 2010-06-13 10:07:53 UTC (rev 113408)
+++ five.customerize/trunk/CHANGES.txt 2010-06-13 10:21:27 UTC (rev 113409)
@@ -4,60 +4,66 @@
1.0b2 - unreleased
------------------
+- Package metadata cleanup and provide a buildout configuration for testing
+ the package on its own.
+ [hannosch]
+
- Made tests compatible with Zope 2.13 and avoid deprecation warnings.
[hannosch]
1.0b1 - 2010-05-01
------------------
-Updated imports to avoid dependencies on zope.app.component and
-zope.app.container. [davisagli]
+- Updated imports to avoid dependencies on zope.app.component and
+ zope.app.container.
+ [davisagli]
-Fixed a memory leak by making sure that TTW view subclasses are only
-generated once, rather than once per request. [davisagli]
+- Fixed a memory leak by making sure that TTW view subclasses are only
+ generated once, rather than once per request.
+ [davisagli]
-Make sure TTW viewlet and portlet classes get the containing view as the
-view parameter on initialization, rather than getting themselves.
-[davisagli]
+- Make sure TTW viewlet and portlet classes get the containing view as the
+ view parameter on initialization, rather than getting themselves.
+ [davisagli]
1.0a1 - 2009-11-14
------------------
-Support Zope 2.12's BoundPageTemplateFile.
+- Support Zope 2.12's BoundPageTemplateFile.
-Fixed deprecation warnings for use of Globals.
+- Fixed deprecation warnings for use of Globals.
-Specify all package dependencies.
+- Specify all package dependencies.
-Avoid a dependency on zope.app.apidoc by copying over the getViews method.
+- Avoid a dependency on zope.app.apidoc by copying over the getViews method.
-0.3 (2008/07/07)
+0.3 - 2008-07-07
----------------
-Fix for the long-standing issue where the security context had mysteriously
-gone missing.
+- Fix for the long-standing issue where the security context had mysteriously
+ gone missing.
-0.2 (2007/08/17)
+0.2 - 2007-08-17
----------------
-Support for viewlets and portlets as used in Plone 3.0
+- Support for viewlets and portlets as used in Plone 3.0
-0.1.3 (2007/07/08)
+0.1.3 - 2007-07-08
------------------
-Fix in setup.py
+- Fix in setup.py
-0.1.2 (2007/05/04)
+0.1.2 - 2007-05-04
------------------
-Release for Plone 3.0beta3 without OSX metadata
+- Release for Plone 3.0beta3 without OSX metadata
-0.1.1 (2007/03/03)
+0.1.1 - 2007-03-03
------------------
-Minor tweaks and enhancements for the integration into Plone 3.0
+- Minor tweaks and enhancements for the integration into Plone 3.0
-0.1 (2006/10/30)
+0.1 - 2006-10-30
----------------
-Initial version.
+- Initial version.
Modified: five.customerize/trunk/INSTALL.txt
===================================================================
--- five.customerize/trunk/INSTALL.txt 2010-06-13 10:07:53 UTC (rev 113408)
+++ five.customerize/trunk/INSTALL.txt 2010-06-13 10:21:27 UTC (rev 113409)
@@ -12,12 +12,8 @@
Installation
------------
-Place the ``five`` top-level package into your instance's
-``lib/python`` directory. You can also install it as an egg using
-ez_install, for example into your instance by turning it into a
-virtualenv.
+Install the distribution as a normal egg into your Zope environment.
-
Configuration
-------------
@@ -26,8 +22,8 @@
<include package="five.customerize" />
-Alternatively, you can also add this line to the bottom of
-``etc/site.zcml``.
+Alternatively, you can also add this line to the bottom of ``etc/site.zcml``
+or include the line into another packages ``configure.zcml``.
Running the Tests
Added: five.customerize/trunk/bootstrap.py
===================================================================
--- five.customerize/trunk/bootstrap.py (rev 0)
+++ five.customerize/trunk/bootstrap.py 2010-06-13 10:21:27 UTC (rev 113409)
@@ -0,0 +1,60 @@
+##############################################################################
+#
+# 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.
+"""
+
+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.customerize/trunk/bootstrap.py
___________________________________________________________________
Added: svn:eol-style
+ native
Added: five.customerize/trunk/buildout.cfg
===================================================================
--- five.customerize/trunk/buildout.cfg (rev 0)
+++ five.customerize/trunk/buildout.cfg 2010-06-13 10:21:27 UTC (rev 113409)
@@ -0,0 +1,9 @@
+[buildout]
+parts = test
+develop = .
+
+[test]
+recipe = zc.recipe.testrunner
+eggs =
+ five.customerize
+defaults = ['-c', '--module', 'five.customerize']
Property changes on: five.customerize/trunk/buildout.cfg
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: five.customerize/trunk/src/five/__init__.py
===================================================================
--- five.customerize/trunk/src/five/__init__.py 2010-06-13 10:07:53 UTC (rev 113408)
+++ five.customerize/trunk/src/five/__init__.py 2010-06-13 10:21:27 UTC (rev 113409)
@@ -1,7 +1 @@
-# namespace package boilerplate
-try:
- __import__('pkg_resources').declare_namespace(__name__)
-except ImportError, e:
- from pkgutil import extend_path
- __path__ = extend_path(__path__, __name__)
-
+__import__('pkg_resources').declare_namespace(__name__)
Deleted: five.customerize/trunk/test.py
===================================================================
--- five.customerize/trunk/test.py 2010-06-13 10:07:53 UTC (rev 113408)
+++ five.customerize/trunk/test.py 2010-06-13 10:21:27 UTC (rev 113409)
@@ -1,37 +0,0 @@
-#!/usr/bin/env python
-##############################################################################
-#
-# Copyright (c) 2004 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (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.
-#
-##############################################################################
-"""Sample test script using zope.testing.testrunner
-
-see zope.testing testrunner.txt
-
-$Id$
-"""
-
-from os.path import join, split
-from sys import argv, path, exit
-
-src = join(split(argv[0])[0], 'src')
-path.insert(0, src) # put at beginning to avoid one in site_packages
-
-from zope.testing import testrunner
-
-defaults = [
- '--path', src,
- '--package', 'zope.i18nmessageid',
- '--tests-pattern', '^tests$',
- ]
-
-exit(testrunner.run(defaults))
-
More information about the checkins
mailing list