Metadata 1.3, wheel edits

This commit is contained in:
Daniel Holth 2012-10-18 21:06:24 -04:00
parent 76b5c3d266
commit 3b3c108e38
2 changed files with 23 additions and 9 deletions

View File

@ -33,10 +33,14 @@ Metadata Files
The syntax defined in this PEP is for use with Python distribution The syntax defined in this PEP is for use with Python distribution
metadata files. The file format is a simple UTF-8 encoded Key: value metadata files. The file format is a simple UTF-8 encoded Key: value
format with no maximum line length. It is parsable by the ``email`` format with no maximum line length. It is parsable by the ``email``
module with an appropriate ``email.policy.Policy()``. The field names module with an appropriate ``email.policy.Policy()``. The field names
listed in the `Fields`_ section are used as the header names. listed in the `Fields`_ section are used as the header names.
In Python 3.2, a serviceable read-only parser is::
email.parser.Parser().parsestr(metadata)
There are two standard locations for these metadata files: There are two standard locations for these metadata files:
* the ``PKG-INFO`` file included in the base directory of Python * the ``PKG-INFO`` file included in the base directory of Python
@ -66,7 +70,8 @@ Fields marked with "(Multiple use)" may be specified multiple
times in a single metadata file. Other fields may only occur times in a single metadata file. Other fields may only occur
once in a metadata file. Fields marked with "(optional)" are once in a metadata file. Fields marked with "(optional)" are
not required to appear in a valid metadata file; all other not required to appear in a valid metadata file; all other
fields must be present. fields must be present. The fields may appear in any order within
the file.
Metadata-Version Metadata-Version
:::::::::::::::: ::::::::::::::::
@ -236,6 +241,11 @@ maintained by someone other than the original author: it should be
omitted if it is identical to ``Author``. omitted if it is identical to ``Author``.
Example:: Example::
An implementation might iterate over all the declared `Extension:`
fields to invoke the processors for those extensions. As the order of
the fields is not used, the `Extension: Chili` field may appear before
or after its declared tags `Chili/Type:` etc.
Maintainer: C. Schultz, Universal Features Syndicate, Maintainer: C. Schultz, Universal Features Syndicate,
Los Angeles, CA <cschultz@peanuts.example.com> Los Angeles, CA <cschultz@peanuts.example.com>
@ -480,12 +490,17 @@ Extension (multiple-use)
An ASCII string, not containing whitespace or the / character, that An ASCII string, not containing whitespace or the / character, that
indicates the presence of extended metadata. Additional tags defined by indicates the presence of extended metadata. Additional tags defined by
the extension should be of the form string/Name:: an `Extension: Chili` should be of the form `Chili/Name`::
Extension: Chili Extension: Chili
Chili/Type: Poblano Chili/Type: Poblano
Chili/Heat: Mild Chili/Heat: Mild
An implementation might iterate over all the declared `Extension:`
fields to invoke the processors for those extensions. As the order of
the fields is not used, the `Extension: Chili` field may appear before
or after its declared tags `Chili/Type:` etc.
Version Specifiers Version Specifiers
================== ==================

View File

@ -190,9 +190,9 @@ The .dist-info directory
#. INSTALLER and REQUESTED are not included in the archive. #. INSTALLER and REQUESTED are not included in the archive.
#. RECORD.jws is used for digital signatures. It is not mentioned in #. RECORD.jws is used for digital signatures. It is not mentioned in
RECORD. RECORD.
#. RECORD.p7s is reserved as a courtesy to anyone who would prefer to #. RECORD.p7s is allowed as a courtesy to anyone who would prefer to
use s/mime signatures to secure their wheel files. It is not use s/mime signatures to secure their wheel files. It is not
mentioned in RECORD. mentioned in RECORD and it is ignored by the official tools.
#. During extraction, wheel installers verify all the hashes in RECORD #. During extraction, wheel installers verify all the hashes in RECORD
against the file contents. Apart from RECORD and its signatures, against the file contents. Apart from RECORD and its signatures,
installation will fail if any file in the archive is not both installation will fail if any file in the archive is not both
@ -210,10 +210,9 @@ the .data directory, named as the .dist-info directory but with the
distribution-1.0.data/ distribution-1.0.data/
The .data directory contains subdirectories and those subdirectories The .data directory contains subdirectories with the scripts, headers,
contain the scripts, headers, documentation and so forth from the documentation and so forth from the distribution. During installation the
distribution. During installation the contents of these subdirectories contents of these subdirectories are moved onto their destination paths.
are moved onto their destination paths.
Signed wheel files Signed wheel files