[Distutils] [buildout] extending a .cfg supplied by another package

Tres Seaver tseaver at palladion.com
Fri May 14 16:10:20 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Wolfgang Schnerring wrote:
> * Jim Fulton <jim at zope.com> [2010-05-12 21:51]:
>> Chris Withers <chris at simplistix.co.uk> wrote:
>>> I'd like to be able to do:
>>> [buildout]
>>> extends=some.package:aconfig.cfg
>> - Descriptions of specific situations where this would solve a
>>   problem, with specific examples of how the proposed meachanism would
>>   be applied.
> 
> I don't know what Chris had in mind, but one use case for me is
> versioning the buildout configuration and keeping it in sync with the
> package I'm buildouting. For example, say the way a package is deployed
> changes from its version 1.5 to 2.0, so some buildout parts need to work
> differently than before, e. g. because the appserver needs to be
> configured differently now.
> 
> I'm not aware of a good way to deal with that currently, other than
> using an SCM tag for the buildout config files. But this is cumbersome,
> as a) it's an additional thing you need to do when cutting a release and
> b) you need to take care to first figure out and then check out the
> matching buildout config version for the package version you want to
> deploy.
> 
> If I could put the relevant buildout configuration into the egg itself,
> that would handle this issue nicely.
> 
>> - A syntax proposal.  It has to address distinguishing file paths from
>>   urls from these new things. I suspect these should be expressed as
>>   URLs, e.g.:
>>      project://some.project/aconfig.cfg
> 
> I'd propose egg://some.dotted.name/config.cfg

I think egg:some.dotted.name#config.cfg would be clearer:  the
"hierarchical" URL form is misleading.  We could even adopt the
convention that such config files needed to be registered as entry
points under some given section, e.g.:

  setup(
      ...
      entry_points = { 'zc.buildout.cfg':
       {'buildout.cfg':  './buildout.cfg',
        'develop.cfg': './develop.cfg'},
      }
  )

perhaps with a fallback to searching in the root directory of the egg
for unregistered files.



Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkvtWcwACgkQ+gerLs4ltQ42wgCgmUfJoETb3D+Ogckby4WIVols
N+wAn0I94tV91vB821sTOdtoxjDxw4M/
=0jjq
-----END PGP SIGNATURE-----



More information about the Distutils-SIG mailing list