buildout: overriding the global [versions] section
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... 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
On Wed, Jan 11, 2012 at 10:21 AM, Leonardo Rochael Almeida
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? ... Any comments, for or against?
Overall you raise a good point. Rather than having part-specific versions, I'd rather just let explicit versions specified in in parts (e.g. in eggs options) override versions specifications. Also, there's value in having one place to see see versions used so I it's possible some folks would object to this change. Jim -- Jim Fulton http://www.linkedin.com/in/jimfulton
On 12/01/2012 10:08, Jim Fulton wrote:
Rather than having part-specific versions, I'd rather just let explicit versions specified in in parts (e.g. in eggs options) override versions specifications.
Also, there's value in having one place to see see versions used so I it's possible some folks would object to this change.
Yeah, my take on this is that you should just split these out into separate buildouts. A huge value for me is that a buildout has a consistent set of package versions available across all parts it has managed. Also, bear in mind that any changes you make that allow this will cause problems for extensions such as buildout.dumppickedversions and buildout_versions. cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
participants (3)
-
Chris Withers
-
Jim Fulton
-
Leonardo Rochael Almeida