Skip to content

Commit

Permalink
Package metadata cleanup and provide a buildout configuration for tes…
Browse files Browse the repository at this point in the history
…ting the package on its own.
  • Loading branch information
hannosch committed Jun 13, 2010
1 parent cc4b89c commit 8ab8eed
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 75 deletions.
54 changes: 30 additions & 24 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,66 @@ CHANGES
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.
10 changes: 3 additions & 7 deletions INSTALL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ Prerequisites
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
-------------
Expand All @@ -26,8 +22,8 @@ Place a ``five.customerize-configure.zcml`` file into your instance's

<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
Expand Down
60 changes: 60 additions & 0 deletions bootstrap.py
Original file line number Diff line number Diff line change
@@ -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)
9 changes: 9 additions & 0 deletions buildout.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[buildout]
parts = test
develop = .

[test]
recipe = zc.recipe.testrunner
eggs =
five.customerize
defaults = ['-c', '--module', 'five.customerize']
8 changes: 1 addition & 7 deletions src/five/__init__.py
Original file line number Diff line number Diff line change
@@ -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__)
37 changes: 0 additions & 37 deletions test.py

This file was deleted.

0 comments on commit 8ab8eed

Please sign in to comment.