[Checkins] SVN: lovely.recipe/trunk/ generated script names are created from the section name to allow more than

Juergen Kartnaller juergen at kartnaller.at
Mon Sep 3 02:59:30 EDT 2007


Log message for revision 79442:
  generated script names are created from the section name to allow more than
  just one extractor in one buildout.
  

Changed:
  U   lovely.recipe/trunk/CHANGES.txt
  U   lovely.recipe/trunk/setup.py
  U   lovely.recipe/trunk/src/lovely/recipe/i18n/README.txt
  U   lovely.recipe/trunk/src/lovely/recipe/i18n/i18n.py

-=-
Modified: lovely.recipe/trunk/CHANGES.txt
===================================================================
--- lovely.recipe/trunk/CHANGES.txt	2007-09-02 19:09:35 UTC (rev 79441)
+++ lovely.recipe/trunk/CHANGES.txt	2007-09-03 06:59:29 UTC (rev 79442)
@@ -9,6 +9,13 @@
           to show for what this all is for.
 
 
+2007/08/31 0.3.1a3:
+===================
+
+- generated script names are created from the section name to allow more than
+  just one extractor in one buildout.
+
+
 2007/08/31 0.3.1a2:
 ===================
 

Modified: lovely.recipe/trunk/setup.py
===================================================================
--- lovely.recipe/trunk/setup.py	2007-09-02 19:09:35 UTC (rev 79441)
+++ lovely.recipe/trunk/setup.py	2007-09-03 06:59:29 UTC (rev 79442)
@@ -13,7 +13,7 @@
 
 setup (
     name='lovely.recipe',
-    version='0.3.1a2',
+    version='0.3.1a3',
     author = "Lovely Systems",
     author_email = "office at lovelysystems.com",
     license = "ZPL 2.1",

Modified: lovely.recipe/trunk/src/lovely/recipe/i18n/README.txt
===================================================================
--- lovely.recipe/trunk/src/lovely/recipe/i18n/README.txt	2007-09-02 19:09:35 UTC (rev 79441)
+++ lovely.recipe/trunk/src/lovely/recipe/i18n/README.txt	2007-09-03 06:59:29 UTC (rev 79442)
@@ -77,6 +77,36 @@
         lovely.recipe.i18n.i18nmergeall.main(['i18nmergeall', '-l', 'src/somewhere/locales'])
 
 
+Tool Names
+----------
+
+The created tools are named after the section name. If the section for the
+recipe is named 'translation' then the tools are named 'translationextract'
+and 'translationmergeall'.
+
+    >>> write(sample_buildout, 'buildout.cfg',
+    ... """
+    ... [buildout]
+    ... parts = translation
+    ...
+    ... offline = true
+    ...
+    ... [translation]
+    ... recipe = lovely.recipe:i18n
+    ... package = lovely.recipe
+    ... domain = recipe
+    ... location = src/somewhere
+    ... output = locales
+    ... maker = z3c.csvvocabulary.csvStrings
+    ... """)
+    >>> print system(buildout),
+    Uninstalling i18n.
+    Installing translation.
+    translation: setting up i18n tools
+    Generated script 'bin/translationextract'.
+    Generated script 'bin/translationmergeall'.
+
+
 Adding a custom configure.zcml
 ------------------------------
 
@@ -106,7 +136,7 @@
     ... """)
 
     >>> print system(buildout),
-    Uninstalling i18n.
+    Uninstalling translation.
     Installing i18n.
     i18n: setting up i18n tools
     Generated script 'bin/i18nextract'.

Modified: lovely.recipe/trunk/src/lovely/recipe/i18n/i18n.py
===================================================================
--- lovely.recipe/trunk/src/lovely/recipe/i18n/i18n.py	2007-09-02 19:09:35 UTC (rev 79441)
+++ lovely.recipe/trunk/src/lovely/recipe/i18n/i18n.py	2007-09-03 06:59:29 UTC (rev 79442)
@@ -61,7 +61,7 @@
         zcmlFilename = os.path.join(partsDir, 'configure.zcml')
         file(zcmlFilename, 'w').write(zcml)
 
-        arguments = ['i18nextract',
+        arguments = ['%sextract'% self.name,
                      '-d', self.options.get('domain', package),
                      '-s', zcmlFilename,
                      '-p', self.options['location'],
@@ -71,20 +71,22 @@
         for m in makers:
             arguments.extend(['-m', m])
         generated = zc.buildout.easy_install.scripts(
-            [('i18nextract', 'lovely.recipe.i18n.i18nextract', 'main')],
+            [('%sextract'% self.name, 'lovely.recipe.i18n.i18nextract', 'main')],
             ws, self.options['executable'], 'bin',
             extra_paths = [this_loc],
             arguments = arguments,
             )
 
-        arguments = ['i18nmergeall',
+        arguments = ['%smergeall'% self.name,
                      '-l', os.path.join(self.options['location'],
                                         self.options.get('output', 'locales'),
                                        ),
                     ]
         generated.extend(
             zc.buildout.easy_install.scripts(
-                [('i18nmergeall', 'lovely.recipe.i18n.i18nmergeall', 'main')],
+                [('%smergeall'% self.name,
+                  'lovely.recipe.i18n.i18nmergeall',
+                  'main')],
                 ws, self.options['executable'], 'bin',
                 extra_paths = [this_loc],
                 arguments = arguments,



More information about the Checkins mailing list