[Distutils] Splitting metadata from setup.py in distutils..

David Lyon david.lyon at preisshare.net
Mon Aug 17 02:55:53 CEST 2009


On Sat, 15 Aug 2009 16:11:52 +0100, Chris Withers <chris at simplistix.co.uk>
wrote:
> Barry Warsaw wrote:
>> On Aug 12, 2009, at 7:09 PM, David Lyon wrote:
>> 
>>> For example, add the ability for setup.py to interact with a new
>>> file called, say "setup.xml".
>> 

Not disagreeing - just discussing..

ConfigParser is good.. no debate.. it's more modern than the
.egg_info metadata format, and easier than xml.

> It the data doesn't need to be nested, I'd say use ConfigParser 
> format... If it does, then reluctantly xml...

We must resist the option to nest (against unnecessary complexity). 
ConfigParser does lists easily so you can store a list of files 
extremely easily. It also does free form text (descriptions).

One advantage of ConfigParser is that it's more built in to
python than xml and just a breeze to edit the data. If somebody
needs scripts to adjust version numbers, that's just so easy also.

For me, that only leaves the choice of a filename.. 

 - setup.info

 - setup.conf

 - others..?

Having a setup.py and a setup.info to me seems simple and
straightforward. It's easier to understand than having all
the metadata 'hardcoded' in a program (as "cute" as that is).

I'll try to build some samples and post them on the distutils
page during the week. It may only be an hour or two of work
to flesh out some improvements.

David







More information about the Distutils-SIG mailing list