]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue 15241: Improved site.py documentation relating to venvs.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Tue, 3 Jul 2012 15:33:57 +0000 (16:33 +0100)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Tue, 3 Jul 2012 15:33:57 +0000 (16:33 +0100)
Doc/library/site.rst
Lib/site.py

index 071706a4287fe6936191d4fa1466d973d9eb9346..3bf8a998c9a28e29ff91cca30cc8778156474f7f 100644 (file)
@@ -38,6 +38,15 @@ Unix and Macintosh).  For each of the distinct head-tail combinations, it sees
 if it refers to an existing directory, and if so, adds it to ``sys.path`` and
 also inspects the newly added path for configuration files.
 
+If a file named "pyvenv.cfg" exists one directory above sys.executable,
+sys.prefix and sys.exec_prefix are set to that directory and
+it is also checked for site-packages and site-python (sys.base_prefix and
+sys.base_exec_prefix will always be the "real" prefixes of the Python
+installation). If "pyvenv.cfg" (a bootstrap configuration file) contains
+the key "include-system-site-packages" set to anything other than "false"
+(case-insensitive), the system-level prefixes will still also be
+searched for site-packages; otherwise they won't.
+
 A path configuration file is a file whose name has the form :file:`{name}.pth`
 and exists in one of the four directories mentioned above; its contents are
 additional items (one per line) to be added to ``sys.path``.  Non-existing items
index a0f98b361b14993f1b7ee83bd9d213416976a135..0aaf46b62f055975fc6a6e866bee67c5aee48710 100644 (file)
@@ -15,8 +15,8 @@ also inspected for path configuration files.
 
 If a file named "pyvenv.cfg" exists one directory above sys.executable,
 sys.prefix and sys.exec_prefix are set to that directory and
-it is also checked for site-packages and site-python (sys.prefix and
-sys.exec_prefix will always be the "real" prefixes of the Python
+it is also checked for site-packages and site-python (sys.base_prefix and
+sys.base_exec_prefix will always be the "real" prefixes of the Python
 installation). If "pyvenv.cfg" (a bootstrap configuration file) contains
 the key "include-system-site-packages" set to anything other than "false"
 (case-insensitive), the system-level prefixes will still also be