[Repoze-checkins] r673 - in repoze.plone/trunk: . repoze/plone repoze/plone/etc

Chris McDonough chrism at agendaless.com
Wed Feb 6 01:47:01 UTC 2008


Author: Chris McDonough <chrism at agendaless.com>
Date: Tue Feb  5 20:47:01 2008
New Revision: 673

Log:
  - Adjust documentation to remove references to repozeproject.
    Manual installation into a virtualenv and subsequent call of
    mkzope2instance is now the preferred method.

  - Use repoze.zope2.instance:mkinstance rather than a custom
    mkinstance (they were getting out of sync, and they don't need to
    be different).

  - Get rid of etc skeleton files since we use
    repoze.zope2.instance:mkinstance and don't need them anymore.

  - Bump repoze.zope2 dependency version to 0.3.0.




Removed:
   repoze.plone/trunk/repoze/plone/etc/
Modified:
   repoze.plone/trunk/CHANGES.txt
   repoze.plone/trunk/README.txt
   repoze.plone/trunk/repoze/plone/__init__.py
   repoze.plone/trunk/setup.py

Modified: repoze.plone/trunk/CHANGES.txt
==============================================================================
--- repoze.plone/trunk/CHANGES.txt	(original)
+++ repoze.plone/trunk/CHANGES.txt	Tue Feb  5 20:47:01 2008
@@ -1,3 +1,18 @@
+0.2.7
+
+  - Adjust documentation to remove references to repozeproject.
+    Manual installation into a virtualenv and subsequent call of
+    mkzope2instance is now the preferred method.
+
+  - Use repoze.zope2.instance:mkinstance rather than a custom
+    mkinstance (they were getting out of sync, and they don't need to
+    be different).
+
+  - Get rid of etc skeleton files since we use
+    repoze.zope2.instance:mkinstance and don't need them anymore.
+
+  - Bump repoze.zope2 dependency version to 0.3.0.
+
 0.2.6
 
   - Depend on repoze.zope2 0.2.6.

Modified: repoze.plone/trunk/README.txt
==============================================================================
--- repoze.plone/trunk/README.txt	(original)
+++ repoze.plone/trunk/README.txt	Tue Feb  5 20:47:01 2008
@@ -6,47 +6,58 @@
 Installing
 
   With a Python 2.4 interpreter >= 2.4.3 (**Python 2.5+ is
-  unsupported**), install the 'repoze.project' package::
+  unsupported**) with setuptools installed, install the 'virtualenv'
+  package::
 
-    $PYTHONHOME/bin/easy_install -i http://dist.repoze.org/simple repoze.project
+    $PYTHONHOME/bin/easy_install virtualenv
 
-  When this is done, invoke the 'repozeproject' script installed into
-  the Python's bin directory via::
+  When this is done, create a virtualenv "sandbox" to hold the
+  repoze.zope2 packages and instance data:
 
-    $PYTHONHOME/bin/repozeproject --path=/path/to/sandbox repoze.plone
+    $PYTHONHOME/bin/virtualenv --no-site-packages /path/to/sandbox
 
-  If you omit '--path /path/to/sandbox', the sandbox will be created
-  within your current working directory.  A sandbox is roughly
-  equivalent to a classic Zope 2 instance home.  NOTE: Some "Syntax
-  Error" messages will be printed to the console during this process;
-  these can be ignored.  This is distutils attempting to byte-compile
-  Zope "Python Scripts" in skin directories that aren't valid Python
-  syntax.
+  A directory named 'sandbox' will be created in the /path/to.
+  directory.  You can use any path you like.
 
-  Creating a sandbox will cause the following actions to be performed.
+  After creating a virtualenv sandbox, install the 'repoze.plone' egg
+  into the virtualenv.
 
-  - a "virtual Python" will be installed within the "/path/to/sandbox"
-    directory.  Packages installed to this virtual Python's
-    'site-packages' directory will not conflict with packages
+    /path/to/sandbox/bin/easy_install -i http://dist.repoze.org/simple repoze.plone
+
+  NOTE: Some "Syntax Error" messages may be printed to the console
+  during this process; these can be ignored.  This is distutils
+  attempting to byte-compile Zope "Python Scripts" in skin directories
+  that aren't valid Python syntax.  
+
+  After the repoze.zope2 packages are installed into the virtualenv,
+  you can finally create "instance" files (config files) within the
+  sandbox by running "mk2zope2instance"::
+
+    /path/to/sandbox/bin/mkzope2instance .
+
+  After these steps have been performed, here's what has happened::
+
+  - a "virtual Python" has been installed within the
+    "/path/to/sandbox" directory.  Packages installed to this virtual
+    Python's 'site-packages' directory will not conflict with packages
     installed into your "normal" Python's 'site-packages' directory.
 
-  - All packages required by repoze.plone will be downloaded,
+  - All packages required by repoze.zope2 have beeen downloaded,
     compiled, and installed as Python eggs in the *virtual* Python's
-    'site-packages' directory.  The "repoze.plone" package will be
-    installed into the virtual Python's site-packages directory as a
-    "development egg".
-
-  - 'Products', 'logs', 'var', and 'etc' directories will be created
-    inside the sandbox directory.  'Products' is where non-egg 3rd
-    party Zope products should be installed.  'logs' is where Zope
-    logs will go, 'var' is where ZODB data files will go, 'etc' is
-    where config files are placed.
+    'site-packages' directory.
+
+  - 'Products', 'logs', 'var', and 'etc' directories have been created
+    inside the sandbox directory.  'Products' is where 3rd party Zope
+    products should be installed.  'logs' is where Zope logs will go,
+    'var' is where ZODB data files will go, 'etc' is where config
+    files are placed.
 
-  - A sample set of configuration files will be installed into the
+  - A sample set of configuration files have been installed into the
     sandbox directory's 'etc' subdirectory.  These include::
 
-    - 'zope2.ini', a Paste configuration file used to establish the
-      Paste (WSGI) pipeline which defines the deployment environment.
+    - 'zope.ini', a Paste configuration file used to establish the
+      Paste (WSGI) pipeline which repoze.zope2 will use to serve up
+      repoze.zope2.
 
     - 'zope.conf', a classic Zope 2 configuration file which can be
       used to adjust Zope settings.
@@ -75,6 +86,8 @@
   debugzope2 -- runs the Python interactive interpreter with the Zope
   root object bound to the "app" name in the global dictionary/
 
+  mkzope2instance -- create zope2 instance files in a directory.
+
 Starting
 
   To start the Zope server on port 8080, cd to the sandbox directory

Modified: repoze.plone/trunk/repoze/plone/__init__.py
==============================================================================
--- repoze.plone/trunk/repoze/plone/__init__.py	(original)
+++ repoze.plone/trunk/repoze/plone/__init__.py	Tue Feb  5 20:47:01 2008
@@ -1,33 +1 @@
-import os
-import re
-import sys
-
-# I would use string.Template, but it's just too hard to change it to
-# respect only ${brace} syntax instead of both that and $name syntax.
-TOKEN_RE = re.compile(r'\$\{([\.\w/-]+)\}')
-def rewrite(repltext, **kw):
-    def replace(match):
-        return kw[match.group(1)]
-    return TOKEN_RE.sub(replace, repltext)
-
-here = os.path.dirname(__file__)
-
-def mkinstance(sandbox=None):
-    if sandbox is None:
-        sandbox = sys.prefix
-    for dir in ('doc', 'bin', 'etc', 'var', 'Products'):
-        path = os.path.join(sandbox, dir)
-        if not os.path.exists(path):
-            os.makedirs(path)
-
-    for source, target in (
-        ('sample-zope2.ini', 'zope2.ini'),
-        ('sample-site.zcml', 'site.zcml'),
-        ('sample-zope.conf', 'zope.conf'),
-        ('sample-apache2.conf', 'apache2.conf'),
-        ):
-        template = open(os.path.join(here, 'etc', source), 'r').read()
-        result = rewrite(template, sandbox=sandbox)
-        targetfile = os.path.join(sandbox, 'etc', target)
-        if not os.path.exists(targetfile):
-            open(targetfile, 'w').write(result)
+# meta-egg package

Modified: repoze.plone/trunk/setup.py
==============================================================================
--- repoze.plone/trunk/setup.py	(original)
+++ repoze.plone/trunk/setup.py	Tue Feb  5 20:47:01 2008
@@ -12,7 +12,7 @@
 #
 ##############################################################################
 
-__version__ = '0.2.6'
+__version__ = '0.2.7'
 
 from ez_setup import use_setuptools
 use_setuptools()
@@ -49,13 +49,13 @@
       include_package_data=True,
       zip_safe=False,
       install_requires=[
-             'repoze.zope2 >= 0.2.6',
+             'repoze.zope2 >= 0.3.0',
              'cmflib >= 2.1.0.0',
              'ploneproducts >= 3.0.1.0'
              ],
       entry_points = """\
       [repoze.project]
-      initialize = repoze.plone:mkinstance
+      initialize = repoze.zope2.instance:mkinstance
       """,
       )
 


More information about the Repoze-checkins mailing list