Hi,
It seems I cannot override, for a single buildout part, the version
information of the global [versions] section.
Is this possible and I just overlooked something?
If not, I intend to add support for that on zc.recipe.egg and/or
z3c.recipe.scripts recipes.
Any comments?
And where can I find the source for z3c.recipe.scripts?
More details below:
I've frequently found myself in the situation of needing to install,
on the same buildout, different parts containing eggs with conflicting
version requirements.
It would be useful if I could specify a version information that
overrode the global [versions] information, in a part with a
zc.recipe.egg or z3c.recipe.scripts recipe.
Notice that specifying the version on the 'eggs' setting doesn't work
to override the global [versions] specification. I.e., the following
buildout.cfg:
[buildout]
parts =
testbrower
versions=versions
[versions]
zope.testbrowser=3.6.0a2
[testbrower]
recipe = zc.recipe.egg
eggs =
zope.testbrowser==3.11.1
-------
Fails with:
The version, 3.6.0a2, is not consistent with the requirement,
'zope.testbrowser==3.11.1'.
While:
Installing testbrower.
Error: Bad version 3.6.0a2
What would be nice is if I could say something like:
[buildout]
parts =
testbrower
versions=versions
[versions]
zope.testbrowser=3.6.0a2
[testbrowser-versions]
zope.testbrowser=3.11.1
[testbrower]
recipe = zc.recipe.egg
versions = testbrowser-versions
eggs =
zope.testbrowser
-------
Or maybe even:
(...)
[testbrower]
recipe = zc.recipe.egg
versions =
zope.testbrowser = 3.11.1
eggs =
zope.testbrowser
-------
And then have buildout pick my version override only while installing
the eggs in that part.
The buildout easy_install API can already [1] accept a local version
specification in the 'versions' keyword to the
zc.buildout.easy_install.install() function. It also specifies that
the global version specification can be retrieved and modified through
the zc.buildout.easy_install.default_versions() function.
[1] http://pypi.python.org/pypi/zc.buildout/1.5.2#specifying-version-information-independent-of-requirements
However, the docs don't say what happens if both a default_versions()
is set and a "versions=" keyword is passed to .install() containing
conflicting information.
In a worse case scenario, I could save the results of
zc.buildout.easy_install.default_versions() and restore after calling
.install() with the overridden versions.
Any comments, for or against?
Jim?
Cheers,
Leo