[Distutils] Alternate static metadata PEP submission...

David Lyon david.lyon at preisshare.net
Thu Oct 15 06:22:42 CEST 2009

On Thu, 15 Oct 2009 12:16:48 +0900, David Cournapeau
<david at ar.media.kyoto-u.ac.jp> wrote:

> I think nested conditions for configurations is a must-have. Once you
> have more than 2-3 variables, doing it like PEP 390 is not really
> manageable. Particularly for C extensions, having many configurations is
> quite common in my experience.

Like I said, one can achieve 'and' and 'or' operations with
configparser headings.

packages = pyopengl

[dependencies python<=2.4]
packages = lxml >= 2.5

[dependencies mac python<=2.4]
packages = shinyxml

Translates roughly into the following python code:

    dependencies = ["pyopengl"]
    if sys.version <= '2.4':
        if sys.platform == 'darwin':

So to me, configparser does provide a way to achieve a
sort of nested capability.

It just needs careful choices of headings.

Some people also use '-' to provide nesting. For

value = 1

[top - nested level 1]
value = 2

[top - nested level 2]
value = 3

These are accessed with 'top' + " - nested level %d" % levelno

To me this is all nesting.

I'm extremely interested to know of a practical example of
something related to packaging that we can't script for.

If you think of something, please post it. 'build' and 'test'
were too other keywords that were suggested to work in also.

I don't really want to do a build platform, only something for
the install platform. But here's how they could work.

[dependencies windows build]
packages = py2exe

[dependencies mac build]
packages = py2app

[dependencies test]
packages = unittestplus


More information about the Distutils-SIG mailing list