[Distutils] Proposal for incorporating buildout-versions on buildout (Re: Better version pinning in buildout (buildout-versions))

Marius Gedminas marius at pov.lt
Sun Jan 13 04:43:11 CET 2013


On Sat, Jan 12, 2013 at 03:42:48PM -0500, Alex Clark wrote:
> On 2013-01-12 16:18:36 +0000, Jim Fulton said:
> 
> >On Sat, Jan 5, 2013 at 5:47 PM, Jim Fulton <jim at zope.com> wrote:
> >...
> >>I propose that buildout-versions get incorporated into
> >>buildout in the following way:
> >
> >OK, proposal 1 wasn't accepted.  Here's another stab:
> >
> >Proposal 2
> >----------
> >
> >1. The ``allow-picked-versions`` option gets a new allowed value of
> >   ``show``. if there are unpicked versions and this option is set to
> >   ``show``, then picked/unpinned versions are reported in a way
> >   suitable for copying into a versions section, presumably with the
> >   same format used by buildout-versions today.
> 
> So the possible values becomes: true, false, show (which is true & verbose)
> 
> >
> >2. New buildout option: ``update-versions-file``.  This takes a path
> >   (relative to buildout directory) of a file to update with any
> >   unpinned versions (in a manner roughly the same as
> >   buildout-versions does today).
> >
> >3. New buildout option: ``python-version`` that restricts the Python
> >   version, with the same semantics as buildout-version provides now.
> >
> >4. Change: develop eggs found in the buildout's develop-eggs directory
> >   will be used even if their version conflicts with a pinned version.
> 
> Did somebody ask for this?

I believe I mentioned this.

I used to trip on this gotcha practically every time:

  - work on package foo that depends on bar
  - discover a bug in bar that manifests when I use it from foo
  - check out bar from svn trunk
  - add a 'mg.cfg' in foo's source tree with
      [buildout]
      extends = buildout.cfg
      develop = ../bar
  - bin/buildout -c mg.cfg
  - try some import pdb; pdb.set_trace() or debug prints in
    ../bar/src/..., run a project in foo, wonder why the
    breakpoints/debug prints won't work, check bin/runfoo, see
    ~/.buildout/eggs/bar-1.2.3.egg in there, realize what's the matter
  - edit mg.cfg again, add
      [versions]
      bar =
  - run bin/buildout -c mg.cfg again, continue debugging.

It's an unnecessary speedbump.

> >6. To make it a little easier to supply buildout versions on the
> >   command line, make buildout the default section for command-line
> >   options, so::
> >
> >      update-versions-file=versions.cfg
> >
> >   or::
> >
> >      allow-picked-versions=show
> >
> >   would be allowed. (They are rejected now.)
> 
> So that means I can pass in foo=bar and it will be applied to the
> buildout section? How about allowing parameter/values to be applied
> to any section 

I believe that's already allowed:

>    $ buildout foo:bar=baz
> 
> To set parameter 'bar' with value 'baz' in section 'foo'.

Marius Gedminas
-- 
Life begins when you can spend your spare time programming instead of
watching television.
                -- Cal Keegan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130113/f2636ba1/attachment.pgp>


More information about the Distutils-SIG mailing list