[Distutils] Better version pinning in buildout (buildout-versions)

Jim Fulton jim at zope.com
Mon Jan 7 23:51:56 CET 2013

On Mon, Jan 7, 2013 at 9:57 AM, Marius Gedminas <marius at pov.lt> wrote:
> On Mon, Jan 07, 2013 at 09:45:58AM -0500, Jim Fulton wrote:
>> No.  The versions-file can be used with the existing mechanism.
>> I tried, but apparently failed, to make this clear in the proposal.
>> If both a versions file and a versions section is used, the versions
>> section behaves as it does now and versions in the versions file
>> override versions specified in the versions section.
> This seems backwards to me.
> Consider this example
>     $ cat buildout.cfg
>       [buildout]
>       I-forgot-the-suggested-new-spelling-for-a-versions-file = versions.txt
>       parts = ...
>       ...
>     $ cat mg.cfg
>       [buildout]
>       extends = buildout.cfg
>       versions = versions
>       [versions]
>       SomePackage = overridden_version
> I would expect bin/buildout -c mg.cfg to use my overridden version from
> mg.cfg, not the one from versions-file.txt.

So would you be happy if the version from mg.cfg overrode the
version from the versions file?

> Also, having two similar but slightly distinct mechanisms for version
> pinning?  I'm -1 on that.

In an earlier message, you wrote

> If you also add
>   buildout_versions_file = versions.cfg
> it'll append new version pins to versions.cfg with the versions that
> are picked while you run bin/buildout.  It's not smart -- you have to
> ensure the file you're writing to ends with a [versions] section, and
> that your mail buildout.cfg specifies `extends = versions.cfg` and that
> you have `[buildout] versions = versions` in either of the config files.

This sounded like a complaint to me.  It seemed like a lot of things
you had to know and get right to use the mechanism.

Maybe I read too much into what you wrote.

The version-file option tries to simplify the process.  For the
large percentage of cases where you don't care about known-good sets
or layered configurations, it's the only mechanism you need.

If we had version-file, then the version option would become the
advanced option used when you do need to layer configurations.


Jim Fulton
Jerky is better than bacon! http://zo.pe/Kqm

More information about the Distutils-SIG mailing list