[Distutils] Standard packaging API? (was Re: Are there any plans to move to pip/wheels in buildout?)

Nick Coghlan ncoghlan at gmail.com
Tue Dec 2 02:44:23 CET 2014

On 2 December 2014 at 05:54, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:
> AFAIK pip does use distlib (it is vendored by pip), but only for some
> ancillary functions such as pre-release version checks.

The current direction things appear to be going is:

* use distlib to get a "batteries included" approach to packaging
infrastructure (which may include some distlib specific capabilities)
* use the reborn "packaging" if you want a minimalist "just the
approved PEPs, thanks" API

The latter is at https://pypi.python.org/pypi/packaging, and
maintained by Donald & Marcus as a way of factoring out a supported
pip independent library API for the interoperable PEP based behaviour.

The current focus is on ensuring it provides a suitable API to
implement the PEP 440 support in both pip and setuptools, so I'm not
sure if it can be considered stable just yet.

Longer term, it may potentially make sense to have distlib also depend
on the lower level packaging API, but there's also value in having two
somewhat independent implementations to help reduce the chance of the
overall ecosystem coming to rely on implementation defined behaviour

> I'm not sure it's a good idea to use pip's internal API (as it's internal,
> and I don't believe it's been designed for use as a library by external
> code).

Agreed - the components intended for external use are the ones being
factored out into the packaging.


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

More information about the Distutils-SIG mailing list