[Checkins] SVN: Sandbox/ulif/grokadmin/ Create basic infrastructure for a decoupled grokadmin.

Uli Fouquet uli at gnufix.de
Mon Oct 8 06:29:23 EDT 2007


Log message for revision 80708:
  Create basic infrastructure for a decoupled grokadmin.

Changed:
  A   Sandbox/ulif/grokadmin/
  A   Sandbox/ulif/grokadmin/branches/
  A   Sandbox/ulif/grokadmin/tags/
  A   Sandbox/ulif/grokadmin/trunk/
  A   Sandbox/ulif/grokadmin/trunk/INSTALL.txt
  A   Sandbox/ulif/grokadmin/trunk/LICENSE.txt
  A   Sandbox/ulif/grokadmin/trunk/README.txt
  A   Sandbox/ulif/grokadmin/trunk/bootstrap/
  A   Sandbox/ulif/grokadmin/trunk/bootstrap/bootstrap.py
  A   Sandbox/ulif/grokadmin/trunk/buildout.cfg
  A   Sandbox/ulif/grokadmin/trunk/setup.py

-=-
Copied: Sandbox/ulif/grokadmin/trunk/INSTALL.txt (from rev 80707, grok/trunk/INSTALL.txt)
===================================================================
--- Sandbox/ulif/grokadmin/trunk/INSTALL.txt	                        (rev 0)
+++ Sandbox/ulif/grokadmin/trunk/INSTALL.txt	2007-10-08 10:29:23 UTC (rev 80708)
@@ -0,0 +1,63 @@
+Preparing for grok development
+------------------------------
+
+The Grok development sandbox is set up via `zc.buildout`_
+
+.. _zc.buildout: http://cheeseshop.python.org/pypi/zc.buildout
+
+You may have setuptools already installed for your system Python. In
+that case, you may need to upgrade it first because buildout requires
+a very recent version::
+
+    $ sudo easy_install -U setuptools
+
+If this command fails because easy_install is not available, there is
+a good chance you do not have setuptools available for your system
+Python. If so, there is no problem because setuptools will be
+installed locally by buildout.
+
+Bootstrap the buildout environment::
+
+    $ python bootstrap/bootstrap.py
+
+and run the buildout command::
+
+    $ bin/buildout
+    [lots of stuff will be downloaded and installed here]
+
+Note that if you have more than one sandbox for a Zope-based web
+application, it will probably make sense to share the eggs between the
+different sandboxes.  You can tell zc.buildout to use a central eggs
+directory by creating ``~/.buildout/default.cfg`` with the following
+contents::
+
+    [buildout]
+    eggs-directory = /home/bruno/buildout-eggs
+
+Running the demo applications
+-----------------------------
+
+You can start Zope with the demo applications installed with the
+following command:
+
+    $ bin/zopectl fg
+
+If you now connect to port 8080 and log in with username 'grok',
+password 'grok', you should be able to add the grok-based applications
+(such as grokwiki) from the menu.
+
+Running the tests
+-----------------
+
+Grok's tests are easily run by executing the test runner that's
+installed in the ``bin`` directory::
+
+    $ bin/test
+
+Generating the website files
+----------------------------
+
+Grok's tutorial documents for the website can easily be generated
+using the following script in ``bin``:
+
+    $ bin/grok2html /path/of/output/directory

Copied: Sandbox/ulif/grokadmin/trunk/LICENSE.txt (from rev 80707, grok/trunk/LICENSE.txt)
===================================================================
--- Sandbox/ulif/grokadmin/trunk/LICENSE.txt	                        (rev 0)
+++ Sandbox/ulif/grokadmin/trunk/LICENSE.txt	2007-10-08 10:29:23 UTC (rev 80708)
@@ -0,0 +1,54 @@
+Zope Public License (ZPL) Version 2.1
+-------------------------------------
+
+A copyright notice accompanies this license document that
+identifies the copyright holders.
+
+This license has been certified as open source. It has also
+been designated as GPL compatible by the Free Software
+Foundation (FSF).
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the
+following conditions are met:
+
+1. Redistributions in source code must retain the
+   accompanying copyright notice, this list of conditions,
+   and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the accompanying
+   copyright notice, this list of conditions, and the
+   following disclaimer in the documentation and/or other
+   materials provided with the distribution.
+
+3. Names of the copyright holders must not be used to
+   endorse or promote products derived from this software
+   without prior written permission from the copyright
+   holders.
+
+4. The right to distribute this software or to use it for
+   any purpose does not give you the right to use
+   Servicemarks (sm) or Trademarks (tm) of the copyright
+   holders. Use of them is covered by separate agreement
+   with the copyright holders.
+
+5. If any files are modified, you must cause the modified
+   files to carry prominent notices stating that you changed
+   the files and the date of any change.
+
+Disclaimer
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS''
+  AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
+  NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+  AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+  NO EVENT SHALL THE COPYRIGHT HOLDERS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+  DAMAGE.

Copied: Sandbox/ulif/grokadmin/trunk/README.txt (from rev 80707, grok/trunk/README.txt)
===================================================================
--- Sandbox/ulif/grokadmin/trunk/README.txt	                        (rev 0)
+++ Sandbox/ulif/grokadmin/trunk/README.txt	2007-10-08 10:29:23 UTC (rev 80708)
@@ -0,0 +1,46 @@
+Grok
+****
+
+What is grok?
+=============
+
+Grok makes it easier to get started with a Zope 3 web application.
+
+Grok uses the Component Architecture and builds on Zope 3 concepts
+like content objects (models), views, and adapters.  Its simplicity
+lies in using **convention over configuration** and **sensible
+defaults** when wiring components together.  That means neither a
+configuration language like ZCML nor a lot of repetition are needed to
+create a web application with grok.
+
+You can find out much more about Grok at our http://grok.zope.org
+website.
+
+Who is grok?
+============
+
+Grok is a friendly caveman from the Stone Age.  He has a big club that
+he hunts mammoths with.  He will also use this club to smash anything
+he doesn't like.
+
+"ME GROK SMASH ZCML!"
+
+Getting grok
+============
+
+The easiest way to get started with grok is to install the
+`grokproject <http://cheeseshop.python.org/pypi/grokproject>`_ package
+(e.g. via ``easy_install grokproject``) and then create a new project
+area by calling the ``grokproject`` script like so::
+
+  $ grokproject MyProject
+  ... many lines of output here
+
+This will create a project area in ``MyProject`` as well as download
+and install grok and Zope 3 (the application server grok is built on).
+
+You can also get grok from the subversion repository::
+
+  svn co svn://svn.zope.org/repos/main/grok/trunk grok
+
+Then follow the instructions of ``INSTALL.txt``.

Copied: Sandbox/ulif/grokadmin/trunk/bootstrap/bootstrap.py (from rev 80707, zc.buildout/trunk/bootstrap/bootstrap.py)
===================================================================
--- Sandbox/ulif/grokadmin/trunk/bootstrap/bootstrap.py	                        (rev 0)
+++ Sandbox/ulif/grokadmin/trunk/bootstrap/bootstrap.py	2007-10-08 10:29:23 UTC (rev 80708)
@@ -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$
+"""
+
+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)

Copied: Sandbox/ulif/grokadmin/trunk/buildout.cfg (from rev 80707, grok/trunk/buildout.cfg)
===================================================================
--- Sandbox/ulif/grokadmin/trunk/buildout.cfg	                        (rev 0)
+++ Sandbox/ulif/grokadmin/trunk/buildout.cfg	2007-10-08 10:29:23 UTC (rev 80708)
@@ -0,0 +1,58 @@
+[buildout]
+develop = . doc grokwiki
+parts = docs grokwiki zopectl data test
+find-links = http://download.zope.org/distribution/
+extends = versions.cfg
+versions = versions
+
+[docs]
+recipe = zc.recipe.egg
+eggs = grokdocs
+
+[grokwiki]
+recipe = zc.zope3recipes>=0.5.3:application
+eggs = grokwiki
+site.zcml = <include package="grokwiki" />
+            <include package="zope.app.twisted" />
+
+            <unauthenticatedPrincipal id="zope.anybody"
+                                      title="Unauthenticated User" />
+            <unauthenticatedGroup id="zope.Anybody"
+                                  title="Unauthenticated Users" />
+            <authenticatedGroup id="zope.Authenticated"
+                                title="Authenticated Users" />
+            <everybodyGroup id="zope.Everybody"
+                            title="All Users" />
+            <principal id="zope.manager"
+                       title="Manager"
+                       login="grok"
+                       password_manager="Plain Text"
+                       password="grok"
+                       />
+
+            <!-- Replace the following directive if you don't want
+                 public access -->
+            <grant permission="zope.View"
+                   principal="zope.Anybody" />
+            <grant permission="zope.app.dublincore.view"
+                   principal="zope.Anybody" />
+
+            <role id="zope.Manager" title="Site Manager" />
+            <role id="zope.Member" title="Site Member" />
+            <grantAll role="zope.Manager" />
+            <grant role="zope.Manager"
+                   principal="zope.manager" />
+
+[data]
+recipe = zc.recipe.filestorage
+
+# this section named so that the start/stop script is called bin/zopectl
+[zopectl]
+recipe = zc.zope3recipes:instance
+application = grokwiki
+zope.conf = ${data:zconfig}
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = grok
+defaults = ['--tests-pattern', '^f?tests$', '-v']

Copied: Sandbox/ulif/grokadmin/trunk/setup.py (from rev 80707, grok/trunk/setup.py)
===================================================================
--- Sandbox/ulif/grokadmin/trunk/setup.py	                        (rev 0)
+++ Sandbox/ulif/grokadmin/trunk/setup.py	2007-10-08 10:29:23 UTC (rev 80708)
@@ -0,0 +1,90 @@
+from setuptools import setup, find_packages
+import os
+
+# some of the dependencies containing C code have been hardcoded to
+# make sure we only depend on versions for which there is a windows
+# binary. In some cases this means we rely on an earlier version than the
+# latest/greatest version as no Windows binary has been released for it yet.
+# in some cases we also need to do this for non-binary dependencies, as
+# more recent versions rely on versions for which no binary eggs exist.
+
+def read(*rnames):
+    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+long_description = (
+    read('README.txt')
+    + '\n' +
+    read('CHANGES.txt')
+    + '\n' +
+    'Download\n'
+    '********\n'
+    )
+
+setup(
+    name='grok',
+    version='0.11dev',
+    author='Grok Team',
+    author_email='grok-dev at zope.org',
+    url='http://grok.zope.org',
+    download_url='http://cheeseshop.python.org/pypi/grok/',
+    description='Grok: Now even cavemen can use Zope 3!',
+    long_description=long_description,
+    license='ZPL',
+    classifiers=['Environment :: Web Environment',
+                 'Intended Audience :: Developers',
+                 'License :: OSI Approved :: Zope Public License',
+                 'Programming Language :: Python',
+                 'Framework :: Zope3',
+                 ],
+
+    packages=find_packages('src'),
+    package_dir = {'': 'src'},
+    include_package_data = True,
+    zip_safe=False,
+    install_requires=['setuptools',
+                      'martian',
+                      'simplejson',
+                      'pytz',
+                      'ZODB3',
+                      'zope.annotation',
+                      'zope.app.apidoc',
+                      'zope.app.applicationcontrol',
+                      'zope.app.appsetup',
+                      'zope.app.authentication',
+                      'zope.app.catalog',
+                      'zope.app.component',
+                      'zope.app.container',
+                      'zope.app.folder',
+                      'zope.app.intid',
+                      'zope.app.keyreference',
+                      'zope.app.pagetemplate',
+                      'zope.app.publication',
+                      'zope.app.publisher',
+                      'zope.app.renderer',
+                      'zope.app.security',
+                      'zope.app.securitypolicy',
+                      'zope.app.testing',
+                      'zope.app.twisted',
+                      'zope.app.zcmlfiles',
+                      'zope.component',
+                      'zope.configuration',
+                      'zope.dottedname',
+                      'zope.deprecation',
+                      'zope.event',
+                      'zope.formlib',
+                      'zope.hookable',
+                      'zope.i18nmessageid',
+                      'zope.interface',
+                      'zope.lifecycleevent',
+                      'zope.pagetemplate',
+                      'zope.proxy',
+                      'zope.publisher',
+                      'zope.schema',
+                      'zope.security',
+                      'zope.testing',
+                      'zope.traversing',
+                      'zope.testbrowser',
+                      'zc.catalog',
+                      'z3c.flashmessage',
+                      ],
+)



More information about the Checkins mailing list