[Checkins] SVN: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py refactored working set construction
Wolfgang Schnerring
wosc at wosc.de
Wed Jan 28 06:35:55 EST 2009
Log message for revision 95295:
refactored working set construction
Changed:
U z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py
-=-
Modified: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py
===================================================================
--- z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py 2009-01-28 11:34:20 UTC (rev 95294)
+++ z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py 2009-01-28 11:35:54 UTC (rev 95295)
@@ -62,10 +62,6 @@
return installed
def _install_run_script(self):
- eggs = zc.recipe.egg.Egg(
- self.buildout, self.name, dict(eggs='z3c.recipe.compattest'))
- _, ws = eggs.working_set()
-
bindir = self.buildout['buildout']['bin-directory']
runners = ['%s-%s' % (self.name, package) for package
in self.wanted_packages]
@@ -73,7 +69,8 @@
return zc.buildout.easy_install.scripts(
[(self.script, 'z3c.recipe.compattest.runner', 'main')],
- ws, self.buildout['buildout']['executable'],
+ self._working_set('z3c.recipe.compattest'),
+ self.buildout['buildout']['executable'],
bindir, arguments = '%s' % ', '.join(runners))
def _wanted_packages(self):
@@ -95,7 +92,11 @@
return projects
def _needs_test_dependencies(self, package):
+ ws = self._working_set(package)
+ package = ws.find(pkg_resources.Requirement.parse(package))
+ return 'test' in package.extras
+
+ def _working_set(self, package):
eggs = zc.recipe.egg.Egg(self.buildout, self.name, dict(eggs=package))
_, ws = eggs.working_set()
- package = ws.find(pkg_resources.Requirement.parse(package))
- return 'test' in package.extras
+ return ws
More information about the Checkins
mailing list