[Distutils] Builders vs Installers

Nick Coghlan ncoghlan at gmail.com
Wed Mar 27 00:50:39 CET 2013

On Wed, Mar 27, 2013 at 8:01 AM, Donald Stufft <donald at stufft.io> wrote:
> Hopefully this will be included in .dist-info and in every package so we*
> can pretend PKF-INFO doesn't exist ;)

The key-value format is actually easier for hand editing and covers
most cases. The extension format allows embedded JSON for more complex
cases. As an on-disk format, it's isomorphic to JSON, so I don't
actually plan to propose changing it.

Where we *do* need JSON-compatible metadata, though, is as an easy to
pass around in-memory data structure for use in APIs. In particular,
metadata 2.0 will be defining this format (and how to convert it
to/from the key/value format) so that the signature of the
post-install hook can be:

    def post_install_hook(installed, previous=None):

"installed" will be a string-keyed metadata dictionary for the
distribution that was just installed, containing only dicts, lists and
strings as values.
"previous" will be the metadata for the version of the distribution
that was previously installed, if any.


P.S. And now I'm leaving for the airport to fly home to Australia - no
more replies from me for a couple of days :)

Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Distutils-SIG mailing list