[Distutils] setup.cfg new format proposal

Tarek Ziadé ziade.tarek at gmail.com
Wed Sep 16 12:11:26 CEST 2009

On Wed, Sep 16, 2009 at 2:30 AM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
>> Tarek Ziadé wrote:
>>> Imagine a command with the name "foo", that has an option called
>>> "condition".
> If you really want to keep the entire keyword namespace
> available for use as a section sees fit, it would be better
> to put the conditions inside the section headers, as I
> suggested earlier.
> I think that would also make it easier to see which
> sections are conditional when looking through the file.

yes, that's another option. It just feel weird to my eyes but I guess
that's just me..

So this would be:

verbose: 1

name: MyDistribution
version: 1.0

[setup:sys_platform == 'win32']
requires: pywin32

[setup:sys_platform == 'darwin']
requires: foo

[setup:'linux' in sys_platform]
requires: bar

verbose: 1
condition: badababdalolo

I am not including 'requires' in the section like you have previously shown,
since it's a metadata field and since we will probably have other fields
in these section (see PEP 341 proposals like 'obsoles')

Tarek Ziadé | http://ziade.org | オープンソースはすごい!

More information about the Distutils-SIG mailing list