[Distutils] setup.cfg

Erik Bray erik.m.bray at gmail.com
Wed Nov 26 00:35:53 CET 2014


On Sat, Nov 22, 2014 at 10:49 AM, Donaldo Fastoso
<donquestion at rocketmail.com> wrote:
> Hi,
>
> is there a way for python 2.7 to write something like:
>
> setup.py:
>
>     from distutils.core import setup
>     setup()
>
> setup.cfg:
>
>     [metadata]
>     name=foo
>     version=0.1
>
>
> and get on the cmdline:
>
>     python setup.py --name
>     foo
>
>
> in distutils2 this was possible. Has python 2.7 stdlib distutils similar
> capabilities? May i use the [global] section? (as for now i only get
> errors trying that.) Or should i use the [metadata] command to implement
> it myself?

You might consider giving d2to1 <https://pypi.python.org/pypi/d2to1> a
whirl, if it suits your needs otherwise.

It's long been on my todo list to release a successor to d2to1 that is
better documented and not as tied to the ill-fated distutils2 project.
But in the meantime d2to1 does work and pretty well at that.
Unfortunately other priorities have kept updates to it on the
backburner.  You might also consider giving pbr a look:

http://docs.openstack.org/developer/pbr/

This is basically a fork of d2to1 made for OpenStack that I think may
be more actively developed.


Erik


More information about the Distutils-SIG mailing list