[Distutils] setup.cfg new format proposal

Tarek Ziadé ziade.tarek at gmail.com
Sun Sep 13 00:37:09 CEST 2009


On Sat, Sep 12, 2009 at 4:50 PM, Floris Bruynooghe
<floris.bruynooghe at gmail.com> wrote:
>>
>> I can't think of a use case where "in" and "==" is not enough.
>
> Version comparison would be nice though.  Taking your example from
> your blog post: if I where to try to install that on Python 2.4 I'd
> have to edit the condition of the [py25] section to "in ('2.4',
> '2.5')".

or simply do:

"""
condition: python_version ==  '2.4' or python_version == '2.5'
"""

It's more verbose, but I don't think it's too bad

> Maybe this is what you want though, in case you explicitly
> don't support for 2.4.  OTOH it's nice if things would just work in
> case of developers simply not having tried earlier versions.
>
> This also shows how "in" implies a tuple or a list as data type, your
> mini-language was trying to avoid that.  Or did I miss something?

I was thinking about the "in" operator exclusively restricted to strings.
for example:

"""
condition: 'i386' in os_machine
"""

In real python, that would be: 'i386' in os.uname()[-1]


More information about the Distutils-SIG mailing list