[Python-checkins] peps: wheel: add escaping
daniel.holth
python-checkins at python.org
Fri Feb 15 15:51:15 CET 2013
http://hg.python.org/peps/rev/a577c9e0fa5f
changeset: 4740:a577c9e0fa5f
user: Daniel Holth <dholth at fastmail.fm>
date: Fri Feb 15 09:50:50 2013 -0500
summary:
wheel: add escaping
files:
pep-0427.txt | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/pep-0427.txt b/pep-0427.txt
--- a/pep-0427.txt
+++ b/pep-0427.txt
@@ -117,7 +117,7 @@
Distribution name, e.g. 'django', 'pyramid'.
version
- PEP-386 compliant version, e.g. 1.0.
+ Distribution version, e.g. 1.0.
build tag
Optional build number. Must start with a digit. A tie breaker
@@ -143,6 +143,17 @@
called "compatibility tags." The compatibility tags express the
package's basic interpreter requirements and are detailed in PEP 425.
+Escaping and Unicode
+''''''''''''''''''''
+
+Each component of the filename is escaped by replacing runs of
+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.
File contents
'''''''''''''
@@ -158,7 +169,7 @@
#. ``{distribution}-{version}.data/`` contains one subdirectory
for each non-empty install scheme key not already covered, where
the subdirectory name is an index into a dictionary of install paths
- (e.g. ``data``, ``scripts``, ``include``, ``purelib`, ``platlib``).
+ (e.g. ``data``, ``scripts``, ``include``, ``purelib``, ``platlib``).
#. Python scripts must appear in ``scripts`` and begin with exactly
``b'#!python'`` in order to enjoy script wrapper generation and
``#!python`` rewriting at install time. They may have any or no
@@ -166,7 +177,7 @@
#. ``{distribution}-{version}.dist-info/METADATA`` is Metadata version 1.1
or greater (PEP 314, PEP 345, PEP 426) format metadata.
#. ``{distribution}-{version}.dist-info/WHEEL`` is metadata about the archive
- itself, in the same basic key: value format::
+ itself in the same basic key: value format::
Wheel-Version: 0.1
Generator: bdist_wheel 0.7
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list