[Distutils] Alternate static metadata PEP submission...
david at ar.media.kyoto-u.ac.jp
Wed Oct 21 10:49:52 CEST 2009
Chris Withers wrote:
> The thing is, there's just no need for all this code to be in setup.py.
> For me, anything more than:
> from xxx import setup
> ...in the case where all the information is in setup.cfg is totally
FWIW, I have played a bit with something in that direction - this is not
a suggestion for anything at that point, just a toy prototype to play
with some ideas I have concerning a new distribution tool in python:
The basis is a static file format, but richer that the proposed PEP 390:
- the goal is to be able to describe fully a package from the static
data: meta-data, packages, doc, extensions, etc...
- converting from existing setup.py to a static file is possible
through an API (one could have a distutils command to automatically
generate such a file)
- a two lines toysetup.py can build basic packages from an existing
toysetup.info static file
- for the majority of packages out there (the ones which do not
extend distutils, basically), the passage setup.py -> toysetup.info ->
toysetup.py should be "lossless". This is huge IMHO, because it provides
a transition to a system which does not depend on distutils anymore.
An example of the static file is:
BuildRequires: paver, sphinx, numpy
The corresponding setup.py is simply:
from distutils.core import setup
from toydist import parse_static
info_dict = parse_static('toysetup.info').to_dict()
The format is basically a rip-of from cabal (haskell distribution
format) at this point,
More information about the Distutils-SIG