[KSS-checkins] r46823 - in kukit/docs/creating-plugins-plone-conf-2007: . src src/plonedemo src/plonedemo/plonedemo

jvloothuis at codespeak.net jvloothuis at codespeak.net
Sat Sep 22 15:21:11 CEST 2007


Author: jvloothuis
Date: Sat Sep 22 15:21:11 2007
New Revision: 46823

Added:
   kukit/docs/creating-plugins-plone-conf-2007/bootstrap.py
   kukit/docs/creating-plugins-plone-conf-2007/buildout.cfg
   kukit/docs/creating-plugins-plone-conf-2007/src/   (props changed)
   kukit/docs/creating-plugins-plone-conf-2007/src/EXTERNALS.txt
   kukit/docs/creating-plugins-plone-conf-2007/src/plonedemo/
   kukit/docs/creating-plugins-plone-conf-2007/src/plonedemo/plonedemo/
   kukit/docs/creating-plugins-plone-conf-2007/src/plonedemo/plonedemo/__init__.py
   kukit/docs/creating-plugins-plone-conf-2007/src/plonedemo/plonedemo/configure.zcml
   kukit/docs/creating-plugins-plone-conf-2007/src/plonedemo/setup.py
Log:
Added basic builout setup

Added: kukit/docs/creating-plugins-plone-conf-2007/bootstrap.py
==============================================================================
--- (empty file)
+++ kukit/docs/creating-plugins-plone-conf-2007/bootstrap.py	Sat Sep 22 15:21:11 2007
@@ -0,0 +1,55 @@
+##############################################################################
+#
+# 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: bootstrap.py 75593 2007-05-06 21:11:27Z jim $
+"""
+
+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)

Added: kukit/docs/creating-plugins-plone-conf-2007/buildout.cfg
==============================================================================
--- (empty file)
+++ kukit/docs/creating-plugins-plone-conf-2007/buildout.cfg	Sat Sep 22 15:21:11 2007
@@ -0,0 +1,43 @@
+[buildout]
+find-links =
+    http://download.zope.org/distribution/
+    http://effbot.org/downloads
+
+parts = scripts plone zope2 instance
+eggs = PasteScript
+develop =
+#         src/kssplugindemo
+#         src/ploneconf
+        src/kss.templates
+
+[scripts]
+recipe = zc.recipe.egg
+eggs = 
+     kss.templates
+     PasteScript
+
+[plone]
+recipe = plone.recipe.plone
+
+[zope2]
+recipe = plone.recipe.zope2install
+url = ${plone:zope2-url}
+
+[instance]
+recipe = plone.recipe.zope2instance
+zope2-location = ${zope2:location}
+user = admin:admin
+http-address = 8080
+debug-mode = on
+verbose-security = on
+eggs =
+#      plonedemo
+#      kssplugindemo
+
+zeo-client = off
+products = ${plone:products}
+
+zcml=
+#      plonedemo
+#      kssplugindemo
+     

Added: kukit/docs/creating-plugins-plone-conf-2007/src/EXTERNALS.txt
==============================================================================
--- (empty file)
+++ kukit/docs/creating-plugins-plone-conf-2007/src/EXTERNALS.txt	Sat Sep 22 15:21:11 2007
@@ -0,0 +1,7 @@
+#
+# created by: svn propset svn:externals -F ./EXTERNALS.txt .
+#
+
+kss.templates http://codespeak.net/svn/kukit/kss.templates/trunk
+
+

Added: kukit/docs/creating-plugins-plone-conf-2007/src/plonedemo/plonedemo/__init__.py
==============================================================================
--- (empty file)
+++ kukit/docs/creating-plugins-plone-conf-2007/src/plonedemo/plonedemo/__init__.py	Sat Sep 22 15:21:11 2007
@@ -0,0 +1,30 @@
+from Products.CMFCore import utils
+from Products.Archetypes.public import process_types, listTypes
+from config import GLOBALS, PKG_NAME
+from config import AddFilesystemGateway
+
+from Products.GenericSetup import EXTENSION
+from Products.GenericSetup import profile_registry
+import Products.CMFPlone.interfaces
+
+def initialize(context):
+    import content
+    profile_registry.registerProfile( name='default',
+        title='xmlcontent',
+        description='',
+        path='profiles/default',
+        product='xmlcontent',
+        profile_type=EXTENSION,
+        for_=Products.CMFPlone.interfaces.IPloneSiteRoot)
+    
+    content_types, constructors, ftis = process_types(
+        listTypes(PKG_NAME),
+        PKG_NAME)
+    
+    utils.ContentInit(
+        PKG_NAME + ' Content',
+        content_types      = content_types,
+        permission         = AddFilesystemGateway,
+        extra_constructors = constructors,
+        fti                = ftis,
+        ).initialize(context)

Added: kukit/docs/creating-plugins-plone-conf-2007/src/plonedemo/plonedemo/configure.zcml
==============================================================================
--- (empty file)
+++ kukit/docs/creating-plugins-plone-conf-2007/src/plonedemo/plonedemo/configure.zcml	Sat Sep 22 15:21:11 2007
@@ -0,0 +1,38 @@
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    xmlns:browser="http://namespaces.zope.org/browser"
+    xmlns:five="http://namespaces.zope.org/five">
+
+    <five:registerPackage package="." initialize=".initialize" />
+
+    <adapter 
+      for=".interfaces.IATContentGateway"
+      factory=".content.gateway.ContentGateway"
+      provides=".interfaces.IContentGateway"
+      />
+
+    <adapter 
+      for=".interfaces.IATContentGateway
+           zope.publisher.interfaces.browser.IBrowserRequest"
+      factory=".gatewaytraversal.GatewayTraversal"
+      provides="zope.publisher.interfaces.IPublishTraverse"
+      />
+
+    <adapter 
+      for=".interfaces.IContentGateway"
+      factory=".filesystemproxy.FilesystemProxy"
+      provides=".interfaces.IFilesystemProxy"
+      />
+
+    <adapter 
+      for="Products.ZCatalog.interfaces.IZCatalog
+           .interfaces.IContentGateway"
+      factory=".catalogsupport.CatalogIndexer"
+      provides=".interfaces.ICatalogIndexer"
+      />
+
+    <include package=".browser" />
+
+    <include package=".examples" />
+      
+</configure>

Added: kukit/docs/creating-plugins-plone-conf-2007/src/plonedemo/setup.py
==============================================================================
--- (empty file)
+++ kukit/docs/creating-plugins-plone-conf-2007/src/plonedemo/setup.py	Sat Sep 22 15:21:11 2007
@@ -0,0 +1,33 @@
+from setuptools import setup, find_packages
+
+version = '0.1'
+
+setup(name='xmlcontent',
+      version=version,
+      description="Transparent XML publishing for Zope/Plone",
+      long_description="""\
+xmlcontent contains a mechanism to publish XML content from the file
+system with the full feature set of Zope 3.
+
+It does this by creating a proxy object for each XML file. Based on a
+declaration in the XML file a marker interface is set as well. This
+makes it possible to create views and adapters for this proxy object,
+thereby being able to display and even index it.
+""",
+      classifiers=[
+          "Framework :: Plone",
+          "License :: OSI Approved :: LGPL",
+          "Programming Language :: Python",
+      ],
+      keywords='plone xml',
+      author='Jeroen Vloothuis',
+      author_email='jeroen.vloothuis at xs4all.nl',
+      url='http://svn.plone.org/svn/collective/xmlcontent',
+      license='GPL',
+      packages=find_packages(exclude=['ez_setup']),
+      include_package_data=True,
+      zip_safe=False,
+      install_requires=[
+        'setuptools',
+      ],
+      )


More information about the Kukit-checkins mailing list