[Distutils] Alternate static metadata PEP submission...

Chris Withers chris at simplistix.co.uk
Tue Oct 27 17:52:36 CET 2009


David Cournapeau wrote:
> """
> from distutils.core import setup
> from toydist import parse_static
> 
> info_dict = parse_static('toysetup.info').to_dict()
> setup(**info_dict)
> """

Yep, this is the kind of thing I'm looking for.
Except if we're talking about the core, it would be:

from distutils.core import setup,parse_static
setup(**parse_static('setup.cfg').to_dict())

...and of course, because setup.cfg is the default name, we just end up 
with:

from distutils.core import setup
setup()

...unless you want to name setup.cfg something else, right?

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk


More information about the Distutils-SIG mailing list