[Checkins] SVN: z3c.recipe.eggbasket/trunk/ stop using an internal zc.buildout api for retrieving the versions information
Jan-Wijbrand Kolman
janwijbrand at gmail.com
Tue Sep 15 04:39:30 EDT 2009
Log message for revision 104002:
stop using an internal zc.buildout api for retrieving the versions information
Changed:
U z3c.recipe.eggbasket/trunk/CHANGES.txt
U z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/utils.py
-=-
Modified: z3c.recipe.eggbasket/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.eggbasket/trunk/CHANGES.txt 2009-09-15 08:38:21 UTC (rev 104001)
+++ z3c.recipe.eggbasket/trunk/CHANGES.txt 2009-09-15 08:39:30 UTC (rev 104002)
@@ -6,7 +6,8 @@
0.4.3 (unreleased)
==================
-- Nothing changed yet.
+- Stop using an API internal to zc.buildout for retrieving versions
+ information. This fixes breakage with the latest buildout version.
0.4.2 (2009-06-09)
Modified: z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/utils.py
===================================================================
--- z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/utils.py 2009-09-15 08:38:21 UTC (rev 104001)
+++ z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/utils.py 2009-09-15 08:39:30 UTC (rev 104002)
@@ -98,18 +98,15 @@
import zc.buildout.buildout
# Read the buildout/versions file. versionfile can be a file in
- # the current working directory or on some url. zc.buildout
- # nicely takes care of that for us.
- config = zc.buildout.buildout._open(os.getcwd(), versionfile, [])
+ # the current working directory or on some url. zc.buildout nicely
+ # takes care of that for us.
- # Get the version information.
- buildout = config.get('buildout')
- if buildout is None:
- versions = config.get('versions')
- else:
- versions = buildout.get('versions')
- if versions is not None:
- versions = config.get(versions)
+ # Buildout needs a buildout:directory directive. It can compute
+ # one for local config files but not for URLs referencing config
+ # files. We pass the "." directory as the buildout:directory here.
+ buildout = zc.buildout.buildout.Buildout(
+ versionfile, [('buildout', 'directory', '.')])
+ versions = buildout.get('versions')
if versions is None:
log.error("Could not get versions from %s.", versionfile)
sys.exit(1)
More information about the checkins
mailing list