[Distutils] [Python-Dev] distlib updated with resources API

Paul Moore p.f.moore at gmail.com
Thu Oct 4 14:55:18 CEST 2012


On 28 September 2012 18:05, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On Fri, Sep 28, 2012 at 10:07 AM, Daniel Holth <dholth at gmail.com> wrote:
>> Are we trying to kill setuptools? I'm not entirely sure, but we should
>> stop trying to do that. The migration should take essentially forever
>> as soon as it makes sense for each pypi publisher.
>
> I'd certainly like to kill easy_install, and see any popular elements
> of setuptools metadata become officially defined *independently* of
> any given implementation.

What I would like to see is:

1. Every packaging tool creating standards-based (dist-info format)
metadata files. That includes distutils (the "feature freeze"
notwithstanding) as that would catch many existing packages. I'd also
like to see distribute switch to using dist-info rather than egg-info,
although I'm not sure if that's a separate thing or if distribute just
reuses distutils here. New tools like Bento should be using the
dist-info format. Tools that consume metadata (e.g., pip install/pip
freeze) could then focus on the dist-info format, retaining any other
support as legacy-only.

2. Some level of standardised functionality for building and
installing. By "standardised", I mean that given *any* sdist, no
matter what build tool it uses under the scenes, there is a way of
saying "build this, and put the output into the following
directories". For distutils, this is --install-XXX. Distribute
complicates this by changing the meaning of these options (you need
--single-version-externally-managed and --record) but otherwise
follows the standard. Add an API to wrap this (include autodetection
of setuptools/distribute, and hooks for other tools to integrate in,
and you're done). A wrapper like this might be a good thing to have in
distlib.

2a. A common, introspectable, format for describing a distribution and
its build  Not necessary for the above, but useful separately to allow
tools to check whether they need to install dependencies before
building, for example. I don't see a way of having this affect
existing packages, though, short of some form of setup.py converter.
So it'll only be viable to depend on this when a new build tool has
established itself.

3. A standard layout for installed files. This gets harder, because OS
conventions come into play. But basically, the sysconfig locations are
the way to encapsulate this. Oh, and kill the egg format :-)
(Seriously, does the egg format offer any benefit other than the old
multiversion support that no-one uses any more? If not, it probably
should be allowed to die off).

4. A standard binary install format (wheel! :-))

5. Conversion tools to build things like RPMs or MSIs from a wheel
would likely be the best way to integrate platform-format installers.

The other aspect of easy_install is the package location bit. I
believe Vinay has added something like this (the PyPI search and web
scraping code) to distlib.

Paul.


More information about the Distutils-SIG mailing list