[Checkins] SVN: zc.buildout/branches/gary-4/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt add test I overlooked

Gary Poster gary.poster at canonical.com
Wed Feb 3 12:37:30 EST 2010


Log message for revision 108737:
  add test I overlooked

Changed:
  U   zc.buildout/branches/gary-4/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt

-=-
Modified: zc.buildout/branches/gary-4/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt
===================================================================
--- zc.buildout/branches/gary-4/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt	2010-02-03 15:41:04 UTC (rev 108736)
+++ zc.buildout/branches/gary-4/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt	2010-02-03 17:37:29 UTC (rev 108737)
@@ -342,10 +342,39 @@
     d  demo
     d  python
 
-script-initialization
+If you want to have initialization that only affects scripts, not the
+interpreter, you can use script-initialization.  Here's a demonstration.
 
-XXX
+    >>> write(sample_buildout, 'buildout.cfg',
+    ... """
+    ... [buildout]
+    ... parts = demo
+    ...
+    ... [demo]
+    ... recipe = z3c.recipe.scripts
+    ... eggs = demo<0.3
+    ... find-links = %(server)s
+    ... index = %(server)s/index
+    ... interpreter = py
+    ... script-initialization =
+    ...     print "Hi from the script"
+    ... """ % dict(server=link_server))
 
+    >>> print system(buildout),
+    Uninstalling python.
+    Uninstalling demo.
+    Installing demo.
+    Generated script '/sample-buildout/bin/demo'.
+    Generated interpreter '/sample-buildout/bin/py'.
+
+    >>> print system(join(sample_buildout, 'bin', 'py') +
+    ...              ''' -c "print 'Hi from the interpreter'"'''),
+    Hi from the interpreter
+
+    >>> print system(join(sample_buildout, 'bin', 'demo')),
+    Hi from the script
+    2 2
+
 The last new option is ``name``.  This simply changes the name of the
 interpreter, so that you are not forced to use the name of the section.
 
@@ -363,7 +392,6 @@
     ... """ % dict(server=link_server))
 
     >>> print system(buildout),
-    Uninstalling python.
     Uninstalling demo.
     Installing interpreter.
     Generated interpreter '/sample-buildout/bin/python2'.



More information about the checkins mailing list