[Distutils] [Python-Dev] Distutils ML wrap-up: setup.cfg new format

Floris Bruynooghe floris.bruynooghe at gmail.com
Wed Sep 23 14:56:19 CEST 2009


[original mail from python-dev
http://mail.python.org/pipermail/python-dev/2009-September/091947.html]

On Tue, Sep 22, 2009 at 03:21:06PM +0200, Tarek Ziadé wrote:
> The pseudo-grammar is (I don't know how to write those but you'll
> get it hopefully)::
> 
>     comp: '<'|'>'|'=='|'>='|'<='|'<>'|'!='|'in'|'not' 'in'
>     comparison: expr (comp_op expr)*
>     expr: STRING
>     test: or_test
>     or_test: and_test ('or' and_test)*
>     and_test: not_test ('and' not_test)*
>     not_test: 'not' not_test | comparison

Here you're re-introducing '<', '>', '<=' and '>=' while you said [0]
that you where going to drop them.  I'm still not convinced of
allowing this between strings as it will likely lead to mistakes when
comparing "versions".  I'm still tempted by making "python_version" a
RationalVersion() so that you can use '<', '>', '<=' and '>=' safely,
not really convinced of writing something like:

  [setup:python_version == '2.2' or python_version == '2.3' or
   python_version == '2.4']

(Can you even split section headers over multiple lines in ini-files?)


As an asside, python 3 is dropping '<>' so maybe it would be
easier/less confusing to just not include it here?


Regards
Floris


[0] http://mail.python.org/pipermail/distutils-sig/2009-September/013205.html


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


More information about the Distutils-SIG mailing list