summaryrefslogtreecommitdiffstats
path: root/Doc/library/sys.rst
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-03-10 08:53:09 (GMT)
committerGitHub <noreply@github.com>2020-03-10 08:53:09 (GMT)
commit8510f430781118d9b603c3a2f06945d6ebc5fe42 (patch)
tree511cb42b478dd031ff36297a5e0c78b27a4e77a2 /Doc/library/sys.rst
parent700cb587303461d5a96456c56902cfdd8ad50e2d (diff)
downloadcpython-8510f430781118d9b603c3a2f06945d6ebc5fe42.zip
cpython-8510f430781118d9b603c3a2f06945d6ebc5fe42.tar.gz
cpython-8510f430781118d9b603c3a2f06945d6ebc5fe42.tar.bz2
bpo-1294959: Add sys.platlibdir attribute (GH-18381)
Add --with-platlibdir option to the configure script: name of the platform-specific library directory, stored in the new sys.platlitdir attribute. It is used to build the path of platform-specific dynamic libraries and the path of the standard library. It is equal to "lib" on most platforms. On Fedora and SuSE, it is equal to "lib64" on 64-bit systems. Co-Authored-By: Jan Matějek <jmatejek@suse.com> Co-Authored-By: Matěj Cepl <mcepl@cepl.eu> Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r--Doc/library/sys.rst21
1 files changed, 21 insertions, 0 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index f67bf63..98f63fb 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -1138,6 +1138,27 @@ always available.
system's identity.
+.. data:: platlibdir
+
+ Name of the platform-specific library directory. It is used to build the
+ path of platform-specific dynamic libraries and the path of the standard
+ library.
+
+ It is equal to ``"lib"`` on most platforms. On Fedora and SuSE, it is equal
+ to ``"lib64"`` on 64-bit platforms which gives the following ``sys.path``
+ paths (where ``X.Y`` is the Python ``major.minor`` version):
+
+ * ``/usr/lib64/pythonX.Y/``:
+ Standard library (like ``os.py`` of the :mod:`os` module)
+ * ``/usr/lib64/pythonX.Y/lib-dynload/``:
+ C extension modules of the standard library (like the :mod:`errno` module,
+ the exact filename is platform specific)
+ * ``/usr/lib/pythonX.Y/site-packages`` (always use ``lib``, not
+ :data:`sys.platlibdir`): Third-party modules
+
+ .. versionadded:: 3.9
+
+
.. data:: prefix
A string giving the site-specific directory prefix where the platform