[Repoze-checkins] r675 - in repoze.grok/trunk: . repoze/grok/scripts
Chris McDonough
chrism at agendaless.com
Wed Feb 6 02:15:59 UTC 2008
Author: Chris McDonough <chrism at agendaless.com>
Date: Tue Feb 5 21:15:59 2008
New Revision: 675
Log:
- Install a mkgrokinstance script as a console script to support
non-repozeproject based installs.
- Change documentation to prefer non-repozeproject installations.
- Depend on grokproject.
Modified:
repoze.grok/trunk/CHANGES.txt
repoze.grok/trunk/README.txt
repoze.grok/trunk/repoze/grok/scripts/initialize.py
repoze.grok/trunk/setup.py
Modified: repoze.grok/trunk/CHANGES.txt
==============================================================================
--- repoze.grok/trunk/CHANGES.txt (original)
+++ repoze.grok/trunk/CHANGES.txt Tue Feb 5 21:15:59 2008
@@ -1,6 +1,11 @@
repoze.grok Changelog
- Next release
+ repoze.grok 0.1.5 (2007-2-5)
+
+ - Install a mkgrokinstance script as a console script to support
+ non-repozeproject based installs.
+
+ - Change documentation to prefer non-repozeproject installations.
- Depend on grokproject.
Modified: repoze.grok/trunk/README.txt
==============================================================================
--- repoze.grok/trunk/README.txt (original)
+++ repoze.grok/trunk/README.txt Tue Feb 5 21:15:59 2008
@@ -8,32 +8,40 @@
Installing repoze.grok
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.grok
+ $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. Creating a sandbox will
- cause the following actions to be performed.
+ A directory named 'sandbox' will be created in the /path/to.
+ directory. You can use any path you like.
- - setuptools (a dependency) will be downloaded and installed to your
- Python's site-packages directory.
+ After creating a virtualenv sandbox, install the 'repoze.grok 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.grok
+
+ After the repoze.zope2 packages are installed into the virtualenv,
+ you can finally create "instance" files (config files) within the
+ sandbox by running "mkgrokinstance"::
+
+ /path/to/sandbox/bin/mkgrokinstance .
+
+ 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.grok will be downloaded,
+ - All packages required by repoze.grok have beeen downloaded,
compiled, and installed as Python eggs in the *virtual* Python's
- 'site-packages' directory. The "repoze.grok" package will be
- installed into the virtual Python's site-packages directory as a
- "development egg".
+ 'site-packages' directory.
- 'logs', 'var', and 'etc' directories will be created inside the
sandbox directory. 'logs' is where Zope logs will go,
@@ -125,9 +133,9 @@
A sample ".wsgi" deployment script (an analogue of the ones
described in the mod_wsgi documentation) is available in the
- doc/sample_zope2.wsgi file. A sample Apache configuration which
+ skel/sample_grok.wsgi file. A sample Apache configuration which
uses this deployment script is included in the
- doc/sample_apache2.conf file.
+ skel/sample_apache2.conf file.
It's suggested that you serve up repoze.grok with mod_wsgi in
"daemon mode" where each if the mod_wsgi's daemon children runs a
Modified: repoze.grok/trunk/repoze/grok/scripts/initialize.py
==============================================================================
--- repoze.grok/trunk/repoze/grok/scripts/initialize.py (original)
+++ repoze.grok/trunk/repoze/grok/scripts/initialize.py Tue Feb 5 21:15:59 2008
@@ -12,7 +12,9 @@
#
##############################################################################
+import optparse
import os
+import os.path
import re
import sys
@@ -66,3 +68,14 @@
os.makedirs(grok_apps)
+def main(argv=sys.argv):
+ """ Console script target """
+ parser = optparse.OptionParser(
+ usage='%prog [PATH]'
+ )
+ options, args = parser.parse_args(sys.argv)
+ if len(args) != 2:
+ parser.print_help(sys.stderr)
+ sys.exit(1)
+ path = os.path.realpath(args[1])
+ mkgrokinstance(path)
Modified: repoze.grok/trunk/setup.py
==============================================================================
--- repoze.grok/trunk/setup.py (original)
+++ repoze.grok/trunk/setup.py Tue Feb 5 21:15:59 2008
@@ -12,7 +12,7 @@
#
##############################################################################
-__version__ = '0.1.4'
+__version__ = '0.1.5'
GROK_VERSION = '0.11' # track the underlying grok release for clarity.
@@ -23,7 +23,6 @@
import re
from setuptools import setup, find_packages
-from distutils.cmd import Command
from ConfigParser import ConfigParser
from urllib2 import urlopen
@@ -91,6 +90,9 @@
[paste.server_runner]
zserver = repoze.grok.server:run_zserver
+ [console_scripts]
+ mkgrokinstance = repoze.grok.scripts.initialize:main
+
[repoze.project]
initialize = repoze.grok.scripts.initialize:mkgrokinstance
""",
More information about the Repoze-checkins
mailing list