[Checkins] SVN: z3c.recipe.runscript/trunk/src/z3c/recipe/runscript/ handle Windows filenames containing ':'. (ie. 'c:\\foo\bar...)
Christophe Combelles
ccomb at free.fr
Fri Oct 7 10:46:14 EST 2011
Log message for revision 123028:
handle Windows filenames containing ':'. (ie. 'c:\\foo\bar...)
Changed:
U z3c.recipe.runscript/trunk/src/z3c/recipe/runscript/README.txt
U z3c.recipe.runscript/trunk/src/z3c/recipe/runscript/__init__.py
U z3c.recipe.runscript/trunk/src/z3c/recipe/runscript/tests/test_doc.py
-=-
Modified: z3c.recipe.runscript/trunk/src/z3c/recipe/runscript/README.txt
===================================================================
--- z3c.recipe.runscript/trunk/src/z3c/recipe/runscript/README.txt 2011-10-07 06:53:21 UTC (rev 123027)
+++ z3c.recipe.runscript/trunk/src/z3c/recipe/runscript/README.txt 2011-10-07 15:46:13 UTC (rev 123028)
@@ -2,16 +2,16 @@
The ``runscript`` Buildout Recipe
=================================
-Some software is not easily installed using established build patterns, such
+Some software packages are not easily installed using established build patterns, such
as "configure, make, make install". In those cases you want to be able to use
arbitrary scripts to build a particular part. This recipe provides a simple
implementation to run a Python callable for each installing and updating a
part.
- >>> import os
- >>> import z3c.recipe.runscript.tests
- >>> scriptFilename = os.path.join(
- ... os.path.dirname(z3c.recipe.runscript.tests.__file__), 'fooscripts.py')
+ >>> import os
+ >>> import z3c.recipe.runscript.tests
+ >>> scriptFilename = os.path.join(
+ ... os.path.dirname(z3c.recipe.runscript.tests.__file__), 'fooscripts.py')
Let's create a sample buildout to install it:
@@ -36,7 +36,7 @@
Now executing ``installFoo()``
If we run the buildout again, the update method will be called, but since we
-did not specify any, ntohing happens:
+did not specify any, nothing happens:
>>> print system('bin/buildout')
Updating foo.
Modified: z3c.recipe.runscript/trunk/src/z3c/recipe/runscript/__init__.py
===================================================================
--- z3c.recipe.runscript/trunk/src/z3c/recipe/runscript/__init__.py 2011-10-07 06:53:21 UTC (rev 123027)
+++ z3c.recipe.runscript/trunk/src/z3c/recipe/runscript/__init__.py 2011-10-07 15:46:13 UTC (rev 123028)
@@ -23,7 +23,7 @@
name)
def callScript(self, script):
- filename, callable = script.split(':')
+ filename, callable = script.rsplit(':', 1)
filename = os.path.abspath(filename)
module = imp.load_source('script', filename)
# Run the script with all options
Modified: z3c.recipe.runscript/trunk/src/z3c/recipe/runscript/tests/test_doc.py
===================================================================
--- z3c.recipe.runscript/trunk/src/z3c/recipe/runscript/tests/test_doc.py 2011-10-07 06:53:21 UTC (rev 123027)
+++ z3c.recipe.runscript/trunk/src/z3c/recipe/runscript/tests/test_doc.py 2011-10-07 15:46:13 UTC (rev 123028)
@@ -15,6 +15,7 @@
import doctest
import unittest
import zc.buildout.testing
+from os.path import join, pardir
def setUp(test):
@@ -24,7 +25,7 @@
def test_suite():
return doctest.DocFileSuite(
- '../README.txt',
+ join(pardir, 'README.txt'),
setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
)
More information about the checkins
mailing list