[Checkins] SVN: www.zope.org/ Start of website buildout

Wichert Akkerman wichert at wiggy.net
Thu Jan 10 12:44:16 EST 2008


Log message for revision 82780:
  Start of website buildout

Changed:
  A   www.zope.org/
  A   www.zope.org/trunk/
  A   www.zope.org/trunk/README.txt
  A   www.zope.org/trunk/base.cfg
  A   www.zope.org/trunk/bin/
  A   www.zope.org/trunk/bin/control
  A   www.zope.org/trunk/bootstrap.py
  A   www.zope.org/trunk/buildout.cfg
  A   www.zope.org/trunk/products/
  A   www.zope.org/trunk/products/README.txt
  A   www.zope.org/trunk/src/
  A   www.zope.org/trunk/src/README.txt
  A   www.zope.org/trunk/var/
  A   www.zope.org/trunk/var/README.txt
  A   www.zope.org/trunk/versions

-=-
Added: www.zope.org/trunk/README.txt
===================================================================
--- www.zope.org/trunk/README.txt	                        (rev 0)
+++ www.zope.org/trunk/README.txt	2008-01-10 17:44:16 UTC (rev 82780)
@@ -0,0 +1,198 @@
+==============
+Using buildout
+==============
+
+Working with buildout.cfg
+-------------------------
+
+You can change any option in buildout.cfg and re-run bin/buildout to reflect
+the changes. This may delete things inside the 'parts' directory, but should
+keep your Data.fs and source files intact.
+
+To save time, you can run buildout in "offline" (-o) and non-updating (-N)
+mode, which will prevent it from downloading things and checking for new
+versions online:
+
+ $ bin/buildout -Nov
+
+Adding eggs to your buildout
+----------------------------
+
+New packages you are working on (but which are not yet released as eggs and
+uploaded to the Python Package Index, aka PYPI) should be placed in src. You can do:
+
+ $ cd src/
+ $ paster create -t plone my.package
+
+Use "paster create --list-templates" to see all available templates. Answer
+the questions and you will get a new egg. Then tell buildout about your egg
+by editing buildout.cfg and adding your source directory to 'develop':
+
+ [buildout]
+ ...
+ develop =
+    src/my.package
+
+You can list multiple packages here, separated by whitespace or indented
+newlines.
+
+You probably also want the Zope instance to know about the package. Add its
+package name to the list of eggs in the "[instance]" section, or under the
+main "[buildout]" section:
+
+ [instance]
+ ...
+ eggs =
+    ${buildout:eggs}
+    ${plone:eggs}
+    my.package
+
+Leave the ${buildout:eggs} part in place - it tells the instance to use the
+eggs that buildout will have downloaded from the Python Package Index previously.
+
+If you also require a ZCML slug for your package, buildout can create one
+automatically. Just add the package to the 'zcml' option:
+
+ [instance]
+ ...
+ zcml =
+    my.package
+
+When you are finished, re-run buildout. Offline, non-updating mode should
+suffice:
+
+ $ bin/buildout -Nov
+
+Depending on a new egg
+----------------------
+
+If you want to use a new egg that is in the Python Package Index, all you need
+to do is to add it to the "eggs" option under the main "[buildout]" section:
+
+ [buildout]
+ ...
+ eggs =
+    my.package
+
+If it's listed somewhere else than the Python Package Index, you can add a link
+telling buildout where to find it in the 'find-links' option:
+
+ [buildout]
+ ...
+ find-links =
+    http://dist.plone.org
+    http://download.zope.org/distribution/
+    http://effbot.org/downloads
+    http://some.host.com/packages
+
+If you want to use a package that is not registered with the package index
+you can add it to the src/ directory. You need to tell buildout about your
+package by editing buildout.cfg and adding your source directory to
+the 'develop' line:
+
+ [buildout]
+ ...
+ develop =
+    src/my.package
+
+You can list multiple packages here, separated by whitespace or indented
+newlines.
+
+You probably also want the Zope instance to know about the package. Add its
+package name to the list of eggs in the "[instance]" section, or under the
+main "[buildout]" section:
+
+ [instance]
+ ...
+ eggs =
+    ${buildout:eggs}
+    ${plone:eggs}
+    my.package
+
+Leave the ${buildout:eggs} part in place - it tells the instance to use the
+eggs that buildout will have downloaded from the Python Package Index
+previously.
+
+If you also require a ZCML slug for your package, buildout can create one
+automatically. Just add the package to the 'zcml' option:
+
+ [instance]
+ ...
+ zcml =
+    my.package
+
+When you are finished, re-run buildout. Offline, non-updating mode should
+suffice:
+
+ $ bin/buildout -Nov
+
+
+Adding Zope products
+--------------------
+
+If you are using an old-style (non-egg) product, you can either add it as an
+automatically downloaded archive or put it in the top-level "products" folder.
+
+To use a product archive add this to buildout.cfg:
+buildout.cfg more easily:
+
+ [productdistros]
+ recipe = plone.recipe.distros
+ urls =
+    http://plone.org/products/someproduct/releases/1.3/someproduct-1.3.tar.gz
+
+If someproduct-1.3.tar.gz extracts into several products inside a top-level
+directory, e.g. SomeProduct-1.3/PartOne and SomeProduct-1.3/PartTwo, then
+add it as a "nested package":
+
+ [productdistros]
+ recipe = plone.recipe.distros
+ urls =
+    http://plone.org/products/someproduct/releases/1.3/someproduct-1.3.tar.gz
+ nested-packages =
+    someproduct-1.3.tar.gz
+
+Alternatively, if it extracts to a directory which contains the version
+number, add it as a "version suffix package":
+
+ [productdistros]
+ recipe = plone.recipe.distros
+ urls =
+    http://plone.org/products/someproduct/releases/1.3/someproduct-1.3.tar.gz
+ version-suffix-packages =
+    someproduct-1.3.tar.gz
+
+You can also track products by adding a new bundle checkout part. It
+doesn't strictly have to be an svn bundle at all, any svn location will do,
+and cvs is also supported:
+
+ [buildout]
+ ...
+ parts =
+    plone
+    zope2
+    productdistros
+    myproduct
+    instance
+    zopepy
+
+Note that "myproduct" comes before the "instance" part. You then
+need to add a new section to buildout.cfg:
+
+ [myproduct]
+ recipe = plone.recipe.bundlecheckout
+ url = http://svn.plone.org/svn/collective/myproduct/trunk
+
+Finally, you need to tell Zope to find this new checkout and add it to its
+list of directories that are scanned for products:
+
+ [instance]
+ ...
+ products =
+    ${buildout:directory}/products
+    ${productdistros:location}
+    ${plonebundle:location}
+    ${myproduct:location}
+
+Without this last step, the "myproduct" part is simply managing an svn
+checkout and could potentially be used for something else instead.


Property changes on: www.zope.org/trunk/README.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: www.zope.org/trunk/base.cfg
===================================================================
--- www.zope.org/trunk/base.cfg	                        (rev 0)
+++ www.zope.org/trunk/base.cfg	2008-01-10 17:44:16 UTC (rev 82780)
@@ -0,0 +1,56 @@
+[buildout]
+extends = versions.cfg
+parts =
+    plone
+    zope2
+    productdistros
+    zeo
+    instance
+    zopepy
+find-links =
+    http://dist.plone.org
+    http://download.zope.org/ppix/
+    http://effbot.org/downloads
+eggs =
+    elementtree
+develop =
+versions = versions
+
+[plone]
+recipe = plone.recipe.plone
+
+[zope2]
+recipe = plone.recipe.zope2install
+url = ${plone:zope2-url}
+ersion-suffix-packages =
+
+[zeo]
+recipe = plone.recipe.zope2zeoserver
+zope2-location = ${zope2:location}
+zeo-address = 127.0.0.1:8100
+
+[instance]
+recipe = plone.recipe.zope2instance
+zope2-location = ${zope2:location}
+debug-mode = off
+verbose-security = off
+zeo-client = True
+zeo-address = ${zeo:zeo-address}
+user = admin:admin
+http-address = 127.0.0.1:8080
+eggs =
+    ${buildout:eggs}
+    ${plone:eggs}
+zcml =
+products =
+    ${buildout:directory}/products
+    ${productdistros:location}
+    ${plone:products}
+
+[zopepy]
+recipe = zc.recipe.egg
+eggs = ${instance:eggs}
+interpreter = zopepy
+extra-paths = ${zope2:location}/lib/python
+scripts = zopepy
+

Added: www.zope.org/trunk/bin/control
===================================================================
--- www.zope.org/trunk/bin/control	                        (rev 0)
+++ www.zope.org/trunk/bin/control	2008-01-10 17:44:16 UTC (rev 82780)
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+set -e
+
+myself="$0"
+case "$myself" in
+    (/*)
+        mydir="$(dirname $myself)"
+        ;;
+
+    (*)
+        mydir="$(dirname $(pwd)/$myself)"
+        ;;
+esac
+
+buildout="$(dirname $mydir)"
+
+case "$1" in
+    start)
+        echo Starting buildout in $(dirname $buildout)
+        $mydir/zeo start
+        $mydir/instance start
+        ;;
+
+    stop)
+        echo Stopping buildout in $(dirname $buildout)
+        $mydir/instance stop
+        $mydir/zeo stop
+        ;;
+
+    restart)
+        $0 stop
+        $0 start
+        ;;
+
+    *)
+        echo "Usage: $0 (start|stop|restart)" >&2
+        exit 1
+        ;;
+esac
+
+exit 0


Property changes on: www.zope.org/trunk/bin/control
___________________________________________________________________
Name: svn:executable
   + 

Added: www.zope.org/trunk/bootstrap.py
===================================================================
--- www.zope.org/trunk/bootstrap.py	                        (rev 0)
+++ www.zope.org/trunk/bootstrap.py	2008-01-10 17:44:16 UTC (rev 82780)
@@ -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)


Property changes on: www.zope.org/trunk/bootstrap.py
___________________________________________________________________
Name: svn:eol-style
   + native

Added: www.zope.org/trunk/buildout.cfg
===================================================================
--- www.zope.org/trunk/buildout.cfg	                        (rev 0)
+++ www.zope.org/trunk/buildout.cfg	2008-01-10 17:44:16 UTC (rev 82780)
@@ -0,0 +1,19 @@
+# This is the zc.buildout configuration
+# For more information on managing your Plone instance using buildout please
+# see http://plone.org/documentation/tutorial/buildout
+
+[buildout]
+extends = base.cfg
+eggs =
+develop =
+
+[productdistros]
+urls =
+nested-packages =
+version-suffix-packages =
+
+[instance]
+eggs =
+    ${buildout:eggs}
+    ${plone:eggs}
+zcml =

Added: www.zope.org/trunk/products/README.txt
===================================================================
--- www.zope.org/trunk/products/README.txt	                        (rev 0)
+++ www.zope.org/trunk/products/README.txt	2008-01-10 17:44:16 UTC (rev 82780)
@@ -0,0 +1 @@
+Old-style Zope products you are developing can be added here


Property changes on: www.zope.org/trunk/products/README.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: www.zope.org/trunk/src/README.txt
===================================================================
--- www.zope.org/trunk/src/README.txt	                        (rev 0)
+++ www.zope.org/trunk/src/README.txt	2008-01-10 17:44:16 UTC (rev 82780)
@@ -0,0 +1 @@
+Packages in eggs that you develop should go in this directory


Property changes on: www.zope.org/trunk/src/README.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: www.zope.org/trunk/var/README.txt
===================================================================
--- www.zope.org/trunk/var/README.txt	                        (rev 0)
+++ www.zope.org/trunk/var/README.txt	2008-01-10 17:44:16 UTC (rev 82780)
@@ -0,0 +1 @@
+This directory contains the Data.fs ZODB data storage, and other runtime files


Property changes on: www.zope.org/trunk/var/README.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: www.zope.org/trunk/versions
===================================================================
--- www.zope.org/trunk/versions	                        (rev 0)
+++ www.zope.org/trunk/versions	2008-01-10 17:44:16 UTC (rev 82780)
@@ -0,0 +1,7 @@
+[versions]
+plone.recipe.plone = 3.0.5
+
+[productdistros]
+recipe = plone.recipe.distros
+urls =
+nested-packages =



More information about the Checkins mailing list