[Distutils] Metadata files, dist-info/egg-info and migration paths

Vinay Sajip vinay_sajip at yahoo.co.uk
Tue Mar 5 00:17:40 CET 2013

Paul Moore <p.f.moore <at> gmail.com> writes:

> There are two questions here that bear discussion. First of all, when
> creating a wheel, should builders put custom metadata files from the
> existing egg-info data into the dist-info directory. I would suggest
> that yes, they should, as otherwise that data is lost completely - in
> particular, setuptools entry points (and hence executable wrappers)
> fail without the entry_points.txt file. There is some support in
> distlib for replacement functionality in some of these areas (exports,
> the EXPORTS file and script wrappers) but this is at an early stage
> and there's no migration path defined yet that I'm aware of.

distlib could be changed to use entry_points.txt as the filename for now. The
file format is the same.

> The more difficult question is what should happen when a wheel is
> installed. At the moment, tools write out the dist-info directory and
> that's it. That works fine for projects using distribute, or ones that
> don't use setuptools-style metadata. But projects using setuptools
> under Python 2 won't be able to see the metadata. Should we require
> that in order to use wheels, distribute should be used (or a suitably
> patched setuptools, should that become available)? Or should wheel
> installers write a legacy egg-info directory for use by setuptools
> (I'd suggest that this should only happen on Python 2, and even then
> probably only if a specific "legacy" flag was set).

I agree with Daniel here - I don't see any point in writing to .egg-info, and if
people can't use distribute, they'll have to wait for setuptools to get
compatibility. Presumably, the only reason for not using distribute would be
that there's some bug in it which is not in setuptools, and if it's important
enough, surely people will contribute the fix, or if they can't, stick with the
status quo?

I think it makes sense to assist people in migrating from old packaging
standards to new ones by reading e.g. old formats, as wheel and wheeler.py do,
but if we persist in writing old formats, then it doesn't seem like any
migration is actually happening.


Vinay Sajip

More information about the Distutils-SIG mailing list