[Distutils] [Python Language Summit] Distutils / Packaging survey

Floris Bruynooghe floris.bruynooghe at gmail.com
Fri Jan 30 00:34:28 CET 2009

On Thu, Jan 29, 2009 at 11:54:38PM +0100, Tarek Ziadé wrote:
> On Thu, Jan 29, 2009 at 11:50 PM, Tres Seaver <tseaver at palladion.com> wrote:
> >> Perhaps 'setup_config.py'? Something that makes it clear that the
> >> configuration is intended for the setup and installation, *not* the
> >> running Python package.
> >
> > I would argue against making it a .py file at all: make it an INI file,
> > or something.
> setup.cfg could be used in that case.

setup.cfg is a configuration file to be edited by developers.  Going
to modify that at build time is guaranteed to result in unhappy people
at some stage I reckon.

> But having a .py file would allow having some values calculated
> dynamically,

But those could be calculated at the time setup.py runs too.

If it's not directly a .py file there needs to be an stdlib module to
access it easily, manually using ConfigParser is not an option IMHO,
I'd rather do `import foo; foo.prefix'.

An argument against a generated .py file is that this won't work for
single-module python distributions.  But having a .cfg file or
something next to the module/package might defeat the point of trying
to help the FHS in violating it already.  OTOH .egg-info does that too
and seems to be accepted currently.


Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org

More information about the Distutils-SIG mailing list