[Checkins] SVN: z3c.recipe.compattest/trunk/ removed the "check out packages from subversion" feature.
Wolfgang Schnerring
wosc at wosc.de
Wed Sep 30 03:15:49 EDT 2009
Log message for revision 104635:
removed the "check out packages from subversion" feature.
Changed:
U z3c.recipe.compattest/trunk/CHANGES.txt
U z3c.recipe.compattest/trunk/setup.py
U z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt
U z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py
U z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/testing.py
-=-
Modified: z3c.recipe.compattest/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.compattest/trunk/CHANGES.txt 2009-09-30 06:44:35 UTC (rev 104634)
+++ z3c.recipe.compattest/trunk/CHANGES.txt 2009-09-30 07:15:49 UTC (rev 104635)
@@ -5,9 +5,11 @@
0.11 (unreleased)
=================
-- Nothing changed yet.
+- Removed the "check out packages from subversion" feature.
+ If you require such functionality, mr.developer
+ <http://pypi.python.org/pypi/mr.developer> provides this much more
+ comprehensively (and for multiple version control systems, too) .
-
0.10 (2009-09-28)
=================
@@ -28,7 +30,6 @@
- Changed the default master script name to the part name. (Don't add
a "test-" prefix any more.)
-
0.7 (2009-08-13)
================
Modified: z3c.recipe.compattest/trunk/setup.py
===================================================================
--- z3c.recipe.compattest/trunk/setup.py 2009-09-30 06:44:35 UTC (rev 104634)
+++ z3c.recipe.compattest/trunk/setup.py 2009-09-30 07:15:49 UTC (rev 104635)
@@ -27,7 +27,6 @@
package_dir = {'': 'src'},
namespace_packages=['z3c', 'z3c.recipe'],
install_requires=[
- 'infrae.subversion>=1.4.5',
'setuptools',
'zc.buildout',
'zc.recipe.testrunner',
Modified: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt
===================================================================
--- z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt 2009-09-30 06:44:35 UTC (rev 104634)
+++ z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt 2009-09-30 07:15:49 UTC (rev 104635)
@@ -19,10 +19,6 @@
(default: empty)
- ``script``: the name of the runner script (defaults to the part name)
-- ``svn_url``: SVN repository to search for packages instead of using releases
- (see below)
-- ``svn_directory``: directory to place checkouts in (default: parts/<partname>)
-
>>> cd(sample_buildout)
>>> write('buildout.cfg', """
... [buildout]
@@ -60,56 +56,7 @@
#!...python...
...zope.dottedname...
-Using SVN checkouts
-===================
-When you set an ``svn_url``, the test runners will not refer to released
-eggs, but rather use development-egg links to SVN checkouts of the trunks of
-each package (the checkouts are placed in ``svn_directory``).
-
-Note: Even though the generated testrunners will use development-egg links, this
-does not change the develop-eggs for your buildout itself. We check that before
-the installation of the recipe, there's just the single develop-egg link of the
-package we're working on:
-
->>> ls('develop-eggs')
-- z3c.recipe.compattest.egg-link
-
->>> write('buildout.cfg', """
-... [buildout]
-... parts = compattest-trunk
-...
-... [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)
-
-The checkouts are placed in the ``parts/`` folder by default, but you can
-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
-
-The testrunner uses the checked out version of zope.dottedname:
-
->>> cat('bin', 'compattest-trunk-zope.dottedname')
-#!...python...
-...parts/compattest-trunk/zope.dottedname/src...
-
-But no additional develop-egg links are present:
-
->>> ls('develop-eggs')
-- z3c.recipe.compattest.egg-link
-
Passing options to the test runners
===================================
Modified: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py
===================================================================
--- z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py 2009-09-30 06:44:35 UTC (rev 104634)
+++ z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/recipe.py 2009-09-30 07:15:49 UTC (rev 104635)
@@ -1,4 +1,3 @@
-import infrae.subversion
import os
import pkg_resources
import re
@@ -31,13 +30,6 @@
self.script = self.options.get('script', self.name)
- self.svn_url = self.options.get('svn_url', None)
- if self.svn_url and self.svn_url[-1] != '/':
- self.svn_url += '/'
- self.svn_directory = self.options.get(
- 'svn_directory', os.path.join(
- self.buildout['buildout']['parts-directory'], self.name))
-
# gather options to be passed to the underlying testrunner
self.testrunner_options = {}
for opt in self.options:
@@ -46,42 +38,20 @@
self.testrunner_options[runner_opt] = self.options[opt]
def install(self):
- if self.svn_url:
- if not os.path.exists(self.svn_directory):
- os.mkdir(self.svn_directory)
return self.update()
def update(self):
installed = []
-
- if self.svn_url:
- zc.buildout.easy_install.distribution_cache = {}
- self._install_checkouts()
-
installed.extend(self._install_testrunners())
installed.extend(self._install_run_script())
-
- if self.svn_url:
- self._remove_develop_eggs()
- zc.buildout.easy_install.distribution_cache = {}
-
return installed
def _install_testrunners(self):
installed = []
for package in self.wanted_packages:
- try:
- ws = self._working_set(package)
- package_ = ws.find(pkg_resources.Requirement.parse(package))
- extras = '[' + ','.join(package_.extras) + ']'
- except zc.buildout.easy_install.MissingDistribution, e:
- if e.data[0].project_name == package and not self.svn_url:
- # This package has a project in subversion but no
- # release (yet). We'll ignore it for now.
- print "No release found for %s. Ignoring." % package
- self.wanted_packages.remove(package)
- continue
- raise
+ ws = self._working_set(package)
+ package_ = ws.find(pkg_resources.Requirement.parse(package))
+ extras = '[' + ','.join(package_.extras) + ']'
options = self.testrunner_options.copy()
options['eggs'] = package + extras
@@ -117,35 +87,3 @@
eggs = zc.recipe.egg.Egg(self.buildout, self.name, dict(eggs=package))
_, ws = eggs.working_set()
return ws
-
- 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.develop_eggs.append(package)
-
- recipe = infrae.subversion.Recipe(self.buildout, self.name, dict(
- urls='\n'.join(checkout_list),
- location=self.svn_directory,
- as_eggs='true',
- no_warnings='true',
- ))
- recipe.newest = True
- recipe.update()
-
- def _remove_develop_eggs(self):
- eggdir = self.buildout['buildout']['develop-eggs-directory']
- for egg_link in os.listdir(eggdir):
- egg, _ = os.path.splitext(egg_link)
- if egg in self.develop_eggs:
- os.unlink(os.path.join(eggdir, egg_link))
Modified: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/testing.py
===================================================================
--- z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/testing.py 2009-09-30 06:44:35 UTC (rev 104634)
+++ z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/testing.py 2009-09-30 07:15:49 UTC (rev 104635)
@@ -20,9 +20,6 @@
zc.buildout.testing.install('zope.testing', test)
zc.buildout.testing.install('zope.interface', test)
zc.buildout.testing.install('zope.exceptions', test)
-
- zc.buildout.testing.install('infrae.subversion', test)
- zc.buildout.testing.install('py', test)
zc.buildout.testing.install('zope.dottedname', test)
def tearDown(test):
More information about the checkins
mailing list