[Distutils] PEP 376 Status

David Cournapeau cournape at gmail.com
Tue Mar 30 10:13:04 CEST 2010


On Tue, Mar 30, 2010 at 7:48 AM, Tres Seaver <tseaver at palladion.com> wrote:

> It seems to me that sdists and binary dists need to be introspectable in
> the same way that and installed and "develop" dists are.  Shouldn't the
> information needed to generate the RECORD file be present in the sdist
> somehow?  E.g., the CSV file could be there, but with placeholder /
> logical names for the target files?

I would strongly suggest at looking at existing projects which do the
exact same thing before inventing something from scratch. For example,
cabal has the notion of Installed Package Info, which is produced at
build time and shipped in binaries (and somewhere at install time),
for this exact purpose.

The syntax does not matter, but the key points are:
 - any installer can be regenerated from this manifest (+ the built
files of course)
 - it contains everything necessary to index the corresponding package
when installed (when installed, the path variables should be resolved
to the actual variables)
 - it should be reasonably fast to parse because most packagers will
need to deal with those  quite extensively (although one could imagine
putting this info in a db to speed things up).

FWIW, I used to use a custom format for toydist, but I am now
converting to a simple ConfigParser-like format, which will look like:

[meta]
name = Sphinx
# All the PKG-INFO metadata here
....
[variables]
# All path variables, + a few toydist specific stuff
prefix = some_path
site_packages = $libdir/$py_version/site-packages
...

[file:pythonfiles:library]
source_dir = build/lib.linux-2.6/
target_dir = $sitedir
files = .....

David


More information about the Distutils-SIG mailing list