clarified the .egg-info format

This commit is contained in:
Tarek Ziadé 2009-07-01 13:15:40 +00:00
parent 903c283912
commit 308b986ca0
1 changed files with 23 additions and 14 deletions

View File

@ -139,29 +139,34 @@ To address those issues, this PEP proposes a few changes:
.egg-info becomes a directory
=============================
The first change would be to make `.egg-info` a directory and let it
hold the `PKG-INFO` file built by the `write_pkg_file` method of
the `Distribution` class in Distutils.
Notice that this change is based on the standard proposed by `EggFormats`,
although this standard proposes two ways to install files:
The `EggFormats` standard from setuptools proposes two formats to install the
metadata information of a distribution:
- A self-contained directory that can be zipped or left unzipped and contains
the distribution files *and* the `.egg-info` directory.
the distribution files *and* an `.egg-info` directory containing the
metadata.
- A distinct `.egg-info` directory located in the site-packages directory.
- A distinct `.egg-info` directory located in the site-packages directory,
with the metadata inside.
You may refer to the `EggFormats` documentation for more details.
This PEP proposes to keep just one format and make it the standard way to
install the metadata of a distribution : a distinct `.egg-info` directory
located in the site-packages directory, containing the metadata.
This change will not impact Python itself because `egg-info` files are not
This `.egg-info` directory will contain a `PKG-INFO` file built by the
`write_pkg_file` method of the `Distribution` class in Distutils.
This change will not impact Python itself because the metadata files are not
used anywhere yet in the standard library besides Distutils.
However, it will impact the `setuptools` and `pip` projects, but given
the fact that they already work with a directory that contains a `PKG-INFO`
file, the change will have no deep consequences.
file, the change will have no deep consequences. That said, packages installed
other existing pre-standardisation formats will be ignored by the new
system, as explained in the backward compatibility section of this document.
For example, if the `docutils` package is installed, the elements that
will be installed in `site-packages` will become::
Let's take an example of the new format with the `docutils` distribution.
The elements that will be installed in `site-packages` will become::
- docutils/
- roman.py
@ -180,7 +185,8 @@ to a standard version string. Spaces become dots, and all other
non-alphanumeric characters (except dots) become dashes, with runs of
multiple dashes condensed to a single dash. Both attributes are then
converted into their filename-escaped form, i.e. any '-' characters are
replaced with '_'.
replaced with '_' other than the one in 'egg-info' and the one
separating the name from the version number.
Examples::
@ -335,6 +341,9 @@ And following methods:
for each line. If ``local`` is ``True``, the path is transformed into a
local absolute path. Otherwise the raw value from `RECORD` is returned.
A local absolute path is an absolute path in which occurrences of '/'
have been replaced by the system separator given by ``os.sep``.
- ``uses(path)`` -> Boolean
Returns ``True`` if ``path`` is listed in `RECORD`. ``path``