[Python-checkins] cpython: Adds documentation for pythonXX.zip as a landmark.

steve.dower python-checkins at python.org
Fri Sep 9 18:07:55 EDT 2016


https://hg.python.org/cpython/rev/4e1316149051
changeset:   103477:4e1316149051
user:        Steve Dower <steve.dower at microsoft.com>
date:        Fri Sep 09 15:07:46 2016 -0700
summary:
  Adds documentation for pythonXX.zip as a landmark.

files:
  Doc/using/windows.rst |  21 +++++++++++++--------
  1 files changed, 13 insertions(+), 8 deletions(-)


diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst
--- a/Doc/using/windows.rst
+++ b/Doc/using/windows.rst
@@ -747,10 +747,11 @@
 
 * If the environment variable :envvar:`PYTHONHOME` is set, it is assumed as
   "Python Home".  Otherwise, the path of the main Python executable is used to
-  locate a "landmark file" (``Lib\os.py``) to deduce the "Python Home".  If a
-  Python home is found, the relevant sub-directories added to :data:`sys.path`
-  (``Lib``, ``plat-win``, etc) are based on that folder.  Otherwise, the core
-  Python path is constructed from the PythonPath stored in the registry.
+  locate a "landmark file" (either ``Lib\os.py`` or ``pythonXY.zip``) to deduce
+  the "Python Home".  If a Python home is found, the relevant sub-directories
+  added to :data:`sys.path` (``Lib``, ``plat-win``, etc) are based on that
+  folder.  Otherwise, the core Python path is constructed from the PythonPath
+  stored in the registry.
 
 * If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified in
   the environment, and no registry entries can be found, a default path with
@@ -795,7 +796,8 @@
 * If you cannot use the previous suggestions (for example, you are a
   distribution that allows people to run :file:`python.exe` directly), ensure
   that the landmark file (:file:`Lib\\os.py`) exists in your install directory.
-  (Note that it will not be detected inside a ZIP file.)
+  (Note that it will not be detected inside a ZIP file, but a correctly named
+  ZIP file will be detected instead.)
 
 These will ensure that the files in a system-wide installation will not take
 precedence over the copy of the standard library bundled with your application.
@@ -803,10 +805,13 @@
 the first suggestion is the best, as the other may still be susceptible to
 non-standard paths in the registry and user site-packages.
 
-.. versionchanged:: 3.6
+.. versionchanged::
+   3.6
 
-   Adds ``sys.path`` file support and removes ``applocal`` option from
-   ``pyvenv.cfg``.
+   * Adds ``sys.path`` file support and removes ``applocal`` option from
+     ``pyvenv.cfg``.
+   * Adds ``pythonXX.zip`` as a potential landmark when directly adjacent
+     to the executable.
 
 Additional modules
 ==================

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list