[Python-Dev] PEP 376

P.J. Eby pje at telecommunity.com
Thu Jul 2 04:41:52 CEST 2009


At 04:29 PM 7/1/2009 +0200, Tarek Ziadé wrote:
>- Phase 1 : introduction of the egg-info file in distutils
>
>Philipp introduced the creation of a file named xxx.egg-info file in 2006
>(see http://bugs.python.org/issue1459476)  alongside
>distutils-installed package, that contains
>the metadata of the distribution.
>
>- Phase 2:  two new formats in the setuptools project
>
>Then he created two new formats in the setuptools project:

This is backwards.

The .egg-info file was added to distutils and setuptools *after* 
support for the other formats.  In other words, it was a third format 
added to allow other software (such as setuptools and friends) to 
detect the presence of packages installed via the distutils, and 
thereby prevent other tools from installing duplicates.

(.egg-info directories and .egg files/directories already existed.)


>This means that all the third-party tools out there already conform to
>that standard, and that packages installed
>in other formats will not benefit from the new APIs. which means that
>people that want to work with distributions installed as .egg
>directories will have to use setuptools APIs.
>Which makes sense.

Yes and no.  Not providing uninstall support is reasonable, but the 
PEP also has features to query packages in general.

(There's also no technical reason why comparable manifest and 
uninstall support can't be provided for .egg files and directoriees, 
since they already have an implicit manifest: their 
contents.  However, since I'm not currently possessed of the time to 
provide a patch myself, I'm not going to lobby for this as a feature.)


> > If you want, you can then add a cross-reference note, saying something
> > like "The setuptools structure, as proposed in the EggFormats
> > documentation for that package [ref], is a subset of this standard. In
> > order to conform to this PEP, setuptools will have to be amended to
> > only install .egg-info directories in the format defined by this PEP".
>
>I'll work that way.

(Technically, it's an extension of a subset of EggFormats, since it 
adds RECORD and INSTALLER.)


> >
> > "However, it will impact the setuptools and pip projects, but given
> > the fact that..."
> >
> > Confusing. Will these tools need to change (I believe so) or not? If
> > they will need to change, that hardly counts as "no deep consequences"
> > - there's the whole backward compatibility issue for them to handle.
>
>I'll add this in a backward compatibility section, as suggested
>earlier by someone.

They don't need to change, unless they're going to support being 
uninstalled by the tool (in which case they'll need to add RECORD and 
INSTALLER).



More information about the Python-Dev mailing list