Wording tweaks

This commit is contained in:
Nick Coghlan 2014-01-30 22:18:50 +10:00
parent 92a40289d8
commit 5f275ad773
1 changed files with 15 additions and 14 deletions

View File

@ -400,17 +400,18 @@ What's the deal with "purelib" vs. "platlib"?
Is it possible to import Python code directly from a wheel file?
----------------------------------------------------------------
Technically, a subset of wheel files *do* support being placed directly
on ``sys.path`` (due to the combination of supporting installation
via simple extraction and using an archive format that is compatible
with ``zipimport``), but actually doing so is generally discouraged.
Technically, due to the combination of supporting installation via
simple extraction and using an archive format that is compatible with
``zipimport``, a subset of wheel files *do* support being placed directly
on ``sys.path``. However, while this behaviour is a natural consequence
of the format design, actually relying on it is generally discouraged.
Firstly, wheel *is* designed primarily as an installation format, so
skipping the installation step means deliberately avoiding any reliance
on features that assume full installation (such as being able to use
standard tools like ``pip`` and ``virtualenv`` to capture and manage
dependencies in a way that can be properly tracked for auditing and
security update purposes, or integrating fully with the standard
Firstly, wheel *is* designed primarily as a distribution format, so
skipping the installation step also means deliberately avoiding any
reliance on features that assume full installation (such as being able
to use standard tools like ``pip`` and ``virtualenv`` to capture and
manage dependencies in a way that can be properly tracked for auditing
and security update purposes, or integrating fully with the standard
build machinery for C extensions by publishing header files in the
appropriate place).
@ -426,10 +427,10 @@ Is it possible to import Python code directly from a wheel file?
a zip archive the ``__file__`` attribute no longer refers to an
ordinary filesystem path, but to a combination path that includes
both the location of the zip archive on the filesystem and the
relative path to the module inside the archive). Even when software
uses the abstract resource APIs correctly internally, interfacing with
external components may still require the available of an actual on-disk
file.
relative path to the module inside the archive. Even when software
correctly uses the abstract resource APIs internally, interfacing with
external components may still require the availability of an actual
on-disk file.
Like metaclasses, monkeypatching and metapath importers, if you're not
already sure you need to take advantage of this feature, you almost