[Checkins] SVN: z3c.responseheaders/trunk/ eggification and
whitespace cleanup
Juergen Kartnaller
juergen at kartnaller.at
Sat Jul 14 07:09:51 EDT 2007
Log message for revision 77914:
eggification and whitespace cleanup
Changed:
_U z3c.responseheaders/trunk/
A z3c.responseheaders/trunk/CHANGES.txt
A z3c.responseheaders/trunk/bootstrap.py
A z3c.responseheaders/trunk/buildout.cfg
A z3c.responseheaders/trunk/setup.py
U z3c.responseheaders/trunk/src/z3c/__init__.py
U z3c.responseheaders/trunk/src/z3c/responseheaders/setter.py
U z3c.responseheaders/trunk/src/z3c/responseheaders/tests.py
-=-
Property changes on: z3c.responseheaders/trunk
___________________________________________________________________
Name: svn:ignore
+ bin
develop-eggs
dist
parts
Added: z3c.responseheaders/trunk/CHANGES.txt
===================================================================
--- z3c.responseheaders/trunk/CHANGES.txt (rev 0)
+++ z3c.responseheaders/trunk/CHANGES.txt 2007-07-14 11:09:50 UTC (rev 77914)
@@ -0,0 +1,10 @@
+=======
+Changes
+=======
+
+2007/07/14 0.1.0
+================
+
+- First egg release
+
+
Property changes on: z3c.responseheaders/trunk/CHANGES.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: z3c.responseheaders/trunk/bootstrap.py
===================================================================
--- z3c.responseheaders/trunk/bootstrap.py (rev 0)
+++ z3c.responseheaders/trunk/bootstrap.py 2007-07-14 11:09:50 UTC (rev 77914)
@@ -0,0 +1,56 @@
+##############################################################################
+#
+# 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()
+
+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
+
+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.responseheaders/trunk/bootstrap.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: z3c.responseheaders/trunk/buildout.cfg
===================================================================
--- z3c.responseheaders/trunk/buildout.cfg (rev 0)
+++ z3c.responseheaders/trunk/buildout.cfg 2007-07-14 11:09:50 UTC (rev 77914)
@@ -0,0 +1,10 @@
+[buildout]
+develop = .
+parts = test
+
+find-links = http://download.zope.org/distribution/
+
+[test]
+recipe = zc.recipe.testrunner
+defaults = ['--tests-pattern', '^f?tests$']
+eggs = z3c.responseheaders [test]
Added: z3c.responseheaders/trunk/setup.py
===================================================================
--- z3c.responseheaders/trunk/setup.py (rev 0)
+++ z3c.responseheaders/trunk/setup.py 2007-07-14 11:09:50 UTC (rev 77914)
@@ -0,0 +1,31 @@
+#!python
+from setuptools import setup, find_packages
+
+setup(
+ name = 'z3c.responseheaders',
+ version = '0.1.0',
+ author = "Zope Community",
+ author_email = "zope3-dev at zope.org",
+ description = "Adds adaptable response cache header settings",
+ license = "ZPL 2.1",
+ keywords = "zope zope3",
+ url='http://svn.zope.org//z3c.responseheaders',
+ zip_safe=False,
+ packages=find_packages('src'),
+ include_package_data=True,
+ package_dir = {'':'src'},
+ namespace_packages=['z3c',],
+ install_requires=[
+ 'setuptools',
+ 'zope.component',
+ 'zope.interface',
+ 'zope.publisher',
+ 'zope.traversing',
+ ],
+ extras_require = dict(
+ test = ['zope.app.testing',
+ 'zope.app.zcmlfiles',
+ 'zope.testbrowser']
+ ),
+)
+
Property changes on: z3c.responseheaders/trunk/setup.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Modified: z3c.responseheaders/trunk/src/z3c/__init__.py
===================================================================
--- z3c.responseheaders/trunk/src/z3c/__init__.py 2007-07-14 10:59:39 UTC (rev 77913)
+++ z3c.responseheaders/trunk/src/z3c/__init__.py 2007-07-14 11:09:50 UTC (rev 77914)
@@ -0,0 +1,5 @@
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ pass
+
Modified: z3c.responseheaders/trunk/src/z3c/responseheaders/setter.py
===================================================================
--- z3c.responseheaders/trunk/src/z3c/responseheaders/setter.py 2007-07-14 10:59:39 UTC (rev 77913)
+++ z3c.responseheaders/trunk/src/z3c/responseheaders/setter.py 2007-07-14 11:09:50 UTC (rev 77914)
@@ -1,6 +1,5 @@
from zope import interface
from zope import component
-from zope.security.proxy import removeSecurityProxy
import interfaces
def onBrowserViewBeforeTraverse(obj, event):
@@ -18,7 +17,7 @@
def __init__(self, context, request):
self.context = context
self.request = request
-
+
def setHeaders(self):
for name, value in self.headers:
self.request.response.setHeader(name, value)
Modified: z3c.responseheaders/trunk/src/z3c/responseheaders/tests.py
===================================================================
--- z3c.responseheaders/trunk/src/z3c/responseheaders/tests.py 2007-07-14 10:59:39 UTC (rev 77913)
+++ z3c.responseheaders/trunk/src/z3c/responseheaders/tests.py 2007-07-14 11:09:50 UTC (rev 77914)
@@ -12,21 +12,23 @@
#
##############################################################################
"""
-$Id:$
+$Id$
"""
__docformat__ = 'restructuredtext'
import unittest
+from zope import component
+
from zope.testing import doctest
from zope.testing.doctestunit import DocFileSuite
+from zope.publisher.interfaces.browser import IBrowserView
+
from zope.app.testing import setup
-from zope import event
-import setter
-from zope.publisher.interfaces.browser import IBrowserView
from zope.app.publication.interfaces import IBeforeTraverseEvent
-from zope import component
+import setter
+
def setUp(test):
root = setup.placefulSetUp()
component.provideHandler(setter.onBrowserViewBeforeTraverse,
More information about the Checkins
mailing list