PEP-0427: clarify some implementation details.

Hope it's OK to clarify two details that came up during Vinay's distlib wheel
implementation: zip directory filenames are encoded as utf-8, and it's nicer
to put the .dist-info directory at the end of the archive.
This commit is contained in:
Daniel Holth 2013-02-24 21:41:40 -05:00
parent 58cf595925
commit 373b80f240
1 changed files with 17 additions and 3 deletions

View File

@ -101,6 +101,15 @@ Generate script wrappers.
accompanying .exe wrappers. Windows installers may want to add them
during install.
Recommended archiver features
'''''''''''''''''''''''''''''
Place ``.dist-info`` at the end of the archive.
Archivers are encouraged to place the ``.dist-info`` files physically
at the end of the archive. This enables some potentially interesting
ZIP tricks including the ability to amend the metadata without
rewriting the entire archive.
File Format
-----------
@ -149,9 +158,14 @@ non-alphanumeric characters with an underscore ``_``::
re.sub("[^\w\d.]+", "_", distribution, re.UNICODE)
The filename is Unicode. It will be some time before the tools are
updated to support non-ASCII filenames, but they are supported in this
specification.
The archive filename is Unicode. It will be some time before the tools
are updated to support non-ASCII filenames, but they are supported in
this specification.
The filenames *inside* the archive are encoded as UTF-8. Although some
ZIP clients in common use do not properly display UTF-8 filenames,
the encoding is supported by both the ZIP specification and Python's
``zipfile``.
File contents
'''''''''''''