[Checkins] SVN: z3c.pagelet/trunk/ Oops, never checked in my eggification.

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Sep 21 14:49:58 EDT 2007


Log message for revision 79800:
  Oops, never checked in my eggification.
  

Changed:
  A   z3c.pagelet/trunk/README.txt
  A   z3c.pagelet/trunk/bootstrap.py
  A   z3c.pagelet/trunk/buildout.cfg
  A   z3c.pagelet/trunk/setup.py
  U   z3c.pagelet/trunk/src/z3c/__init__.py
  U   z3c.pagelet/trunk/src/z3c/pagelet/README.txt

-=-
Added: z3c.pagelet/trunk/README.txt
===================================================================
--- z3c.pagelet/trunk/README.txt	                        (rev 0)
+++ z3c.pagelet/trunk/README.txt	2007-09-21 18:49:58 UTC (rev 79800)
@@ -0,0 +1,2 @@
+Pagelets are Zope 3 UI components. In particular they allow the developer to
+specify content templates without worrying about the UI O-wrap.


Property changes on: z3c.pagelet/trunk/README.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.pagelet/trunk/bootstrap.py
===================================================================
--- z3c.pagelet/trunk/bootstrap.py	                        (rev 0)
+++ z3c.pagelet/trunk/bootstrap.py	2007-09-21 18:49:58 UTC (rev 79800)
@@ -0,0 +1,52 @@
+##############################################################################
+#
+# Copyright (c) 2007 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.pagelet/trunk/bootstrap.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: z3c.pagelet/trunk/buildout.cfg
===================================================================
--- z3c.pagelet/trunk/buildout.cfg	                        (rev 0)
+++ z3c.pagelet/trunk/buildout.cfg	2007-09-21 18:49:58 UTC (rev 79800)
@@ -0,0 +1,7 @@
+[buildout]
+develop = .
+parts = test
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = z3c.pagelet [test]

Added: z3c.pagelet/trunk/setup.py
===================================================================
--- z3c.pagelet/trunk/setup.py	                        (rev 0)
+++ z3c.pagelet/trunk/setup.py	2007-09-21 18:49:58 UTC (rev 79800)
@@ -0,0 +1,80 @@
+##############################################################################
+#
+# Copyright (c) 2007 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.
+#
+##############################################################################
+"""Setup
+
+$Id$
+"""
+import os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+setup (
+    name='z3c.pagelet',
+    version='1.0.0',
+    author = "Roger Ineichen and the Zope Community",
+    author_email = "zope3-dev at zope.org",
+    description = "Pagelets are way to specify a template without the O-wrap.",
+    long_description=(
+        read('README.txt')
+        + '\n' +
+        'Detailed Documentation\n'
+        '**********************\n'
+        + '\n' +
+        read('src', 'z3c', 'pagelet', 'README.txt')
+        ),
+    license = "ZPL 2.1",
+    keywords = "zope3 template pagelet layout zpt pagetemplate",
+    classifiers = [
+        'Development Status :: 5 - Production/Stable',
+        'Environment :: Web Environment',
+        'Intended Audience :: Developers',
+        'License :: OSI Approved :: Zope Public License',
+        'Programming Language :: Python',
+        'Natural Language :: English',
+        'Operating System :: OS Independent',
+        'Topic :: Internet :: WWW/HTTP',
+        'Framework :: Zope3'],
+    url = 'http://svn.zope.org/z3c.pagelet',
+    packages = find_packages('src'),
+    include_package_data = True,
+    package_dir = {'':'src'},
+    namespace_packages = ['z3c'],
+    extras_require = dict(
+        test = ['zope.app.testing', 'zope.testing'],
+        ),
+    install_requires = [
+        'setuptools',
+        'z3c.template',
+        'zope.app.component',
+        'zope.app.form',
+        'zope.app.pagetemplate',
+        'zope.app.publisher',
+        'zope.app.testing',
+        'zope.component',
+        'zope.configuration',
+        'zope.contentprovider',
+        'zope.formlib',
+        'zope.interface',
+        'zope.pagetemplate',
+        'zope.publisher',
+        'zope.schema',
+        'zope.security',
+        'zope.testing',
+        'zope.traversing',
+        ],
+    dependency_links = ['http://download.zope.org/distribution'],
+    zip_safe = False,
+    )


Property changes on: z3c.pagelet/trunk/setup.py
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: z3c.pagelet/trunk/src/z3c/__init__.py
===================================================================
--- z3c.pagelet/trunk/src/z3c/__init__.py	2007-09-21 16:41:33 UTC (rev 79799)
+++ z3c.pagelet/trunk/src/z3c/__init__.py	2007-09-21 18:49:58 UTC (rev 79800)
@@ -1,16 +1,7 @@
-##############################################################################
-#
-# 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.
-#
-##############################################################################
-"""
-$Id$
-"""
+try:
+    # Declare this a namespace package if pkg_resources is available.
+    import pkg_resources
+    pkg_resources.declare_namespace('z3c')
+except ImportError:
+    pass
+

Modified: z3c.pagelet/trunk/src/z3c/pagelet/README.txt
===================================================================
--- z3c.pagelet/trunk/src/z3c/pagelet/README.txt	2007-09-21 16:41:33 UTC (rev 79799)
+++ z3c.pagelet/trunk/src/z3c/pagelet/README.txt	2007-09-21 18:49:58 UTC (rev 79800)
@@ -1,6 +1,6 @@
-======
-README
-======
+========
+Pagelets
+========
 
 This package provides a very flexible base implementation for write view like
 components which can be higly customized later in custom project. This is
@@ -9,22 +9,22 @@
 What does this mean?
 
 We separate the python view code from the template implementation. And we also
-separate the template in at least two different templates like the content 
+separate the template in at least two different templates like the content
 template and a layout template.
 
-This package uses the z3c.template and offers a implementaton for this 
+This package uses the z3c.template and offers a implementaton for this
 template patterns. Additionaly this package offers a ``pagelet`` directive
 wich can be used for register pagelets.
 
-Pagelets are views which can be called and support the update and render 
-pattern. 
+Pagelets are views which can be called and support the update and render
+pattern.
 
 
 How do they work
 ----------------
 
-A pagelet returns the rendered content without layout in the render method and 
-returns the layout code if we call them. See also z3c.template which shows 
+A pagelet returns the rendered content without layout in the render method and
+returns the layout code if we call them. See also z3c.template which shows
 how the tempalte work. This samples will only show how the base implementation
 located in the z3c.pagelet.browser module get used.
 
@@ -32,10 +32,10 @@
 BrowserPagelet
 --------------
 
-The base implementation called BrowserPagelet offers built in __call__ and 
+The base implementation called BrowserPagelet offers built in __call__ and
 render methods which provide the different template lookup. Take a look at the
-BrowserPage class located in z3c.pagelet.browser and you can see that render 
-method returns a IPageTemplate and the __call__ method a ILayoutTemplate 
+BrowserPage class located in z3c.pagelet.browser and you can see that render
+method returns a IPageTemplate and the __call__ method a ILayoutTemplate
 defined in the z3c.layout package.
 
   # some test stuff
@@ -70,10 +70,10 @@
   ...   </html>
   ... ''')
 
-Let's now register the template for the view and request. We use the 
-TemplateFactory directly from the z3c.template package. This is commonly done 
-using the ZCML directive called ``z3c:pagelet``. Note that we do use a the 
-generic Interface as the view base interface for register the pagelet. This 
+Let's now register the template for the view and request. We use the
+TemplateFactory directly from the z3c.template package. This is commonly done
+using the ZCML directive called ``z3c:pagelet``. Note that we do use a the
+generic Interface as the view base interface for register the pagelet. This
 allows us to register a more specific template in the next sample:
 
   >>> from zope.publisher.interfaces.browser import IDefaultBrowserLayer
@@ -96,7 +96,7 @@
   >>> class IMyView(zope.interface.Interface):
   ...     pass
 
-And we define a view class inherited from BrowserPagelet and implementing the 
+And we define a view class inherited from BrowserPagelet and implementing the
 view marker interface:
 
   >>> class MyView(browser.BrowserPagelet):
@@ -129,11 +129,11 @@
 PageletRenderer
 ---------------
 
-There is also a standard pattern for calling the render method on pagelet. 
+There is also a standard pattern for calling the render method on pagelet.
 Using the pagelet renderer which is a IContentProvider makes it possible to
-reuse existing layout template without the pagelet. If you like to reuse a 
+reuse existing layout template without the pagelet. If you like to reuse a
 layout template without a pagelet you simply have to provide another content
-provider. It's flexible isn't it? As next let's show a sample using the 
+provider. It's flexible isn't it? As next let's show a sample using the
 pagelet renderer.
 
 We define a new layout template using the content provider called ```pagelet``
@@ -163,12 +163,12 @@
   ...
   ContentProviderLookupError: pagelet
 
-That's right, we need to register the content provider ``pagelet`` before we 
+That's right, we need to register the content provider ``pagelet`` before we
 can use them.
 
   >>> from zope.contentprovider.interfaces import IContentProvider
   >>> from z3c.pagelet import provider
-  >>> zope.component.provideAdapter(provider.PageletRenderer, 
+  >>> zope.component.provideAdapter(provider.PageletRenderer,
   ...     provides=IContentProvider, name='pagelet')
 
 Now let's call the view again:
@@ -191,7 +191,7 @@
 What whould the pagelet be without formlib based implementations? We offer base
 implementations for add, edit and display forms based on the formlib.
 
-For the next tests we provide a generic form template like used in formlib. 
+For the next tests we provide a generic form template like used in formlib.
 This template is registered within this package as default for the formlib
 based mixin classes:
 
@@ -202,7 +202,7 @@
   >>> zope.component.provideAdapter(factory,
   ...     (interfaces.IPageletForm, IDefaultBrowserLayer), IPageTemplate)
 
-And we define a new interface includig text attribute: 
+And we define a new interface includig text attribute:
 
   >>> import zope.schema
   >>> class IDocument(zope.interface.Interface):



More information about the Checkins mailing list