[Checkins] SVN: z3c.recipe.compattest/trunk/ simplified building the list of packages:
Wolfgang Schnerring
wosc at wosc.de
Thu Aug 13 02:21:55 EDT 2009
Log message for revision 102724:
simplified building the list of packages:
* don't try to expand section references, just use a plain list of packages
* split on any whitespace, not just newlines
Changed:
U z3c.recipe.compattest/trunk/CHANGES.txt
U z3c.recipe.compattest/trunk/buildout.cfg
U z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt
U z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py
-=-
Modified: z3c.recipe.compattest/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.compattest/trunk/CHANGES.txt 2009-08-13 01:22:26 UTC (rev 102723)
+++ z3c.recipe.compattest/trunk/CHANGES.txt 2009-08-13 06:21:55 UTC (rev 102724)
@@ -5,9 +5,9 @@
0.7 (unreleased)
================
-- Nothing changed yet.
+- Simplified building the list of packages even more: we now just take a list of
+ packages, period.
-
0.6 (2009-08-07)
================
Modified: z3c.recipe.compattest/trunk/buildout.cfg
===================================================================
--- z3c.recipe.compattest/trunk/buildout.cfg 2009-08-13 01:22:26 UTC (rev 102723)
+++ z3c.recipe.compattest/trunk/buildout.cfg 2009-08-13 06:21:55 UTC (rev 102724)
@@ -13,8 +13,8 @@
[compattest-trunk]
recipe = z3c.recipe.compattest
-include = [example-versions]
+include = ${example-kgs:packages}
svn_url = svn://svn.zope.org/repos/main/
-[example-versions]
-zope.dottedname =
+[example-kgs]
+packages = zope.dottedname z3c.recipe.compattest
\ No newline at end of file
Modified: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt
===================================================================
--- z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt 2009-08-13 01:22:26 UTC (rev 102723)
+++ z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt 2009-08-13 06:21:55 UTC (rev 102724)
@@ -13,11 +13,8 @@
Add a part to your buildout.cfg that uses this recipe.
No further configuration is required, but you can set the following options:
-- ``include``: list of packages to include (one package per line)
- If an entry has the form ``[section]``, all keys of that
- buildout section are included.
- (default: the version-section of the buildout (``${buildout:versions}``)
- if one is defined)
+- ``include``: list of packages to include (whitespace-separated)
+ (default: empty)
- ``exclude``: packages matching any regex in this list will be excluded
(default: empty)
- ``script``: the name of the runner script (default: test-<partname>)
@@ -80,16 +77,13 @@
>>> write('buildout.cfg', """
... [buildout]
... parts = compattest-trunk
-... versions = versions
...
-... [versions]
-... # we don't care about the version numbers, we just extract
-... # which package names to include from here
-... z3c.recipe.compattest =
-... zope.dottedname =
+... [kgs]
+... packages = z3c.recipe.compattest zope.dottedname
...
... [compattest-trunk]
... recipe = z3c.recipe.compattest
+... include = ${kgs:packages}
... svn_url = svn://svn.zope.org/repos/main/
... """)
>>> ignore = system(buildout)
Modified: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py
===================================================================
--- z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py 2009-08-13 01:22:26 UTC (rev 102723)
+++ z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py 2009-08-13 06:21:55 UTC (rev 102724)
@@ -9,7 +9,7 @@
def string2list(string, default):
- result = string and string.split('\n') or default
+ result = string and string.split() or default
return [item.strip() for item in result]
@@ -23,12 +23,8 @@
if not 'max_jobs' in options:
options['max_jobs'] = '1'
- self.exclude = string2list(self.options.get('exclude', ''), [])
self.include = string2list(self.options.get('include', ''), [])
- versions_section = self.buildout['buildout'].get('versions')
- if versions_section:
- self.include.append('[%s]' % versions_section)
- self._expand_includes()
+ self.exclude = string2list(self.options.get('exclude', ''), [])
self.wanted_packages = self._wanted_packages()
self.script = self.options.get('script', 'test-%s' % self.name)
@@ -96,14 +92,6 @@
bindir, arguments='%s, %s' % (self.options['max_jobs'],
', '.join(runners)))
- def _expand_includes(self):
- """expands entries of the form [section] to the keys in that section"""
- sections = [x for x in self.include if x.startswith('[')]
- for section in sections:
- self.include.remove(section)
- for package in self.buildout[section[1:-1]]:
- self.include.append(package)
-
def _wanted_packages(self):
projects = self.include
for project in projects:
More information about the Checkins
mailing list