[Erp5-report] r37230 leonardo - in /erp5/trunk/utils/erp5.recipe.testrunner: ./ src/erp5/re...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 21 22:26:17 CEST 2010


Author: leonardo
Date: Wed Jul 21 22:26:16 2010
New Revision: 37230

URL: http://svn.erp5.org?rev=37230&view=rev
Log:
Add [create_database] and [create_database_software_home] variants for automatic inclusion of erp5.recipe.mysqldatabase dependency

Modified:
    erp5/trunk/utils/erp5.recipe.testrunner/CHANGES.txt
    erp5/trunk/utils/erp5.recipe.testrunner/README.txt
    erp5/trunk/utils/erp5.recipe.testrunner/setup.py
    erp5/trunk/utils/erp5.recipe.testrunner/src/erp5/recipe/testrunner/__init__.py

Modified: erp5/trunk/utils/erp5.recipe.testrunner/CHANGES.txt
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.recipe.testrunner/CHANGES.txt?rev=37230&r1=37229&r2=37230&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.recipe.testrunner/CHANGES.txt [utf8] (original)
+++ erp5/trunk/utils/erp5.recipe.testrunner/CHANGES.txt [utf8] Wed Jul 21 22:26:16 2010
@@ -1,6 +1,14 @@
 Changelog
 =========
 
+1.0.6 (unreleased)
+------------------
+
+ - Make erp5.recipe.mysqldatabase an optional dependency that can be
+   automatically included by specifying the [create_database] or
+   [create_database_software_home] extras.
+   [Leonardo Rochael Almeida]
+
 1.0.5 (2010-07-21)
 ------------------
 

Modified: erp5/trunk/utils/erp5.recipe.testrunner/README.txt
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.recipe.testrunner/README.txt?rev=37230&r1=37229&r2=37230&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.recipe.testrunner/README.txt [utf8] (original)
+++ erp5/trunk/utils/erp5.recipe.testrunner/README.txt [utf8] Wed Jul 21 22:26:16 2010
@@ -35,8 +35,18 @@ bt5_path
   Paths containing business templates to be installed
 
 mysql_create_database
-  If true creates the database using the followed extra option.
-  (Starting with mysql_)
+  If true creates the database using the extra options below that come from
+  erp5.recipe.mysqldatabase (Starting with mysql_). Notice that, to use this
+  option (and the ones below) you need to set the recipe as follows:
+
+  * recipe = erp5.recipe.testrunner[create_database]
+    This will use the '[standalone]' variant of erp5.recipe.mysqldatabase and
+    will install the MySQL-python egg automatically
+
+  * recipe = erp5.recipe.testrunner[create_database_software_home]
+    This will use the default variant of erp5.recipe.mysqldatabase and
+    will requrie the MySQL-python egg to be already installed in the python
+    that runs buildout
 
 mysql_database_name
   Mysql Database name.

Modified: erp5/trunk/utils/erp5.recipe.testrunner/setup.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.recipe.testrunner/setup.py?rev=37230&r1=37229&r2=37230&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.recipe.testrunner/setup.py [utf8] (original)
+++ erp5/trunk/utils/erp5.recipe.testrunner/setup.py [utf8] Wed Jul 21 22:26:16 2010
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 
 name = "erp5.recipe.testrunner"
-version = '1.0.5'
+version = '1.0.6'
 
 def read(name):
     return open(name).read()
@@ -31,7 +31,12 @@ setup(
     packages = find_packages('src'),
     package_dir = {'': 'src'},
     install_requires = ['zc.recipe.egg', 
-                        'erp5.recipe.mysqldatabase'],
+                        ],
+    extras_require=dict(
+      create_database=['erp5.recipe.mysqldatabase[standalone]'],
+      create_database_software_home=['erp5.recipe.mysqldatabase'],
+      ),
+
     namespace_packages = ['erp5', 'erp5.recipe'],
     entry_points = {'zc.buildout': ['default = %s:Recipe' % name]},
     )

Modified: erp5/trunk/utils/erp5.recipe.testrunner/src/erp5/recipe/testrunner/__init__.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.recipe.testrunner/src/erp5/recipe/testrunner/__init__.py?rev=37230&r1=37229&r2=37230&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.recipe.testrunner/src/erp5/recipe/testrunner/__init__.py [utf8] (original)
+++ erp5/trunk/utils/erp5.recipe.testrunner/src/erp5/recipe/testrunner/__init__.py [utf8] Wed Jul 21 22:26:16 2010
@@ -16,7 +16,6 @@
 import os, re, shutil, sys, glob
 import zc.buildout
 import zc.recipe.egg
-import erp5.recipe.mysqldatabase
 
 class Recipe:
     '''Creates a runUnitTest aware of eggs and custom paths used in this
@@ -134,6 +133,7 @@ class Recipe:
         # This was copied from erp5.recipe.standalone
         # XXX This part should be splited to another recipe erp5.recipe.createdatabase 
         if options.get('mysql_create_database', 'false').lower() == 'true':
+            import erp5.recipe.mysqldatabase
             erp5.recipe.mysqldatabase.Recipe(self.buildout, self.name, self.options).install()
     
         return [location]




More information about the Erp5-report mailing list