[Distutils] Static metadata using setup.cfg

David Lyon david.lyon at preisshare.net
Tue Aug 18 02:22:51 CEST 2009


On Mon, 17 Aug 2009 09:34:56 +0200, Tarek Ziadé <ziade.tarek at gmail.com>
wrote:
> We can use the [global] section of the setup.cfg file to describe them.

My suggestion is [setup] because it directly corresponds to the setup()
function. I know it is a triplication of the name (setup.cfg, setup()
and then [setup]) but it's much more consistent and will be easier to
find for new users.

[setup]
name: foo
version: 1.0
author: tarek
long_description: some
  long description
  here
 
url: http://example.com

And then...

> """
> from distutils.core import setup
> 
> setup()
> """

That's all that it should be (for now... evil grin.. :-)

In a commercial level app you always need to do extra
stuff. If we can't do this now then fine.. later..

But it needs to be pointed out that these things are
somewhat mandatory for python applications, not
necessarily packages.

"""
from distutils.core import setup
 
preinstall()  # Read current environment and adjust
              # installation.. twiddle directory locations
              # and perphaps make choices dependent on 
              # environment KDE/Gnome/Windows/Mac

setup()       # run the distutils function

postinstall() # Now generate the documentation, register
              # .dll files, update environment, create
              # window manager shortcuts etc

Regards

David




More information about the Distutils-SIG mailing list