[Distutils] [Python-Dev] distlib updated with resources API

Donald Stufft donald.stufft at gmail.com
Sun Sep 30 18:07:29 CEST 2012


On Sunday, September 30, 2012 at 8:59 AM, David Cournapeau wrote:
> Note that all this work has already been done in Bento.
> 
> I understand the appeal of using an existing format like yaml, but it
> is not clear to me how one can handle conditional with it, and I think
> you want to handle conditionals in there (for platform-dependent
> dependencies).
> 
> Bento also has a command to convert setup.py-based projects to bento
> internal format, adapting it to use another format should not be too
> difficult.
> 
> David 
Instead of conditionals the existing ideas use an environment marker, 
so instead of (pseudo format, I just woke up):

     if python_version < 2.6:
        require: simplejson

You would do:
    require: simplejson; python_version < 2.6

This gives you the same sort of ability however instead of using if statements
it encodes it into the requirement string. I'm not completely in love with either
system but I prefer the ; solution over conditionals because it makes the metadata
static no matter what system you run it on and it makes it easy to use an existing
format.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20120930/f5c46cfd/attachment.html>


More information about the Distutils-SIG mailing list