[Checkins] SVN: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/ do not check out packages that already exist as develop eggs
Wolfgang Schnerring
wosc at wosc.de
Wed Jan 28 09:13:55 EST 2009
Log message for revision 95315:
do not check out packages that already exist as develop eggs
Changed:
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/src/z3c/recipe/compattest/README.txt
===================================================================
--- z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt 2009-01-28 14:03:14 UTC (rev 95314)
+++ z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt 2009-01-28 14:13:55 UTC (rev 95315)
@@ -14,9 +14,9 @@
No further configuration is required, but you can set the following options:
- ``svn_url``: SVN repository to search for packages,
-- ``include``: only packages matching this regex will be included
- (default:``^zope\..*``, ``^grokcore\..*``),
-- ``exclude``: packages matching this regex will be excluded, even if
+- ``include``: only packages matching a regex in this list (one regex per line)
+ will be included (default:``^zope\..*``, ``^grokcore\..*``),
+- ``exclude``: packages matching any regex in this list will be excluded, even if
they match ``include`` (default: a list of deprectated/obsolete
``zope.*`` packages, see ``z3c.recipe.compattest.recipe`` for
details),
@@ -87,6 +87,7 @@
... [compattest-trunk]
... recipe = z3c.recipe.compattest
... include = zope.dottedname
+... z3c.recipe.compattest
... use_svn = true
... """)
>>> ignore = system(buildout)
@@ -95,6 +96,9 @@
override this by setting ``svn_directory`` -- so you can share checkouts
between several buildouts, for example.
+Note that for packages that already exist as develop eggs (in our example,
+z3c.recipe.compattest), no checkout is performed.
+
>>> ls('parts/compattest-trunk')
d zope.dottedname
Modified: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py
===================================================================
--- z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py 2009-01-28 14:03:14 UTC (rev 95314)
+++ z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py 2009-01-28 14:13:55 UTC (rev 95315)
@@ -76,7 +76,7 @@
installed = []
if self.use_svn:
- self._checkout_or_update_trunks()
+ self._install_checkouts()
installed.extend(self._install_testrunners())
installed.extend(self._install_run_script())
@@ -139,15 +139,21 @@
_, ws = eggs.working_set()
return ws
- def _checkout_or_update_trunks(self):
- self.installed_develop_eggs = []
+ def _install_checkouts(self):
+ self.develop_eggs = []
+ eggdir = self.buildout['buildout']['develop-eggs-directory']
+ egg_links = os.listdir(eggdir)
+ installed_develop_eggs = [os.path.splitext(f)[0] for f in egg_links]
+
checkout_list = []
for package in self.wanted_packages:
+ if package in installed_develop_eggs:
+ continue
working_copy = os.path.join(self.svn_directory, package)
checkout_list.append('%s%s/trunk %s' % (self.svn_url, package,
package))
- self.installed_develop_eggs.append(package)
+ self.develop_eggs.append(package)
infrae.subversion.Recipe(self.buildout, self.name, dict(
urls='\n'.join(checkout_list),
@@ -159,5 +165,5 @@
eggdir = self.buildout['buildout']['develop-eggs-directory']
for egg_link in os.listdir(eggdir):
egg, _ = os.path.splitext(egg_link)
- if egg in self.installed_develop_eggs:
+ if egg in self.develop_eggs:
os.unlink(os.path.join(eggdir, egg_link))
More information about the Checkins
mailing list