]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-1294959: Try to clarify the meaning of platlibdir (GH-20332)
authorMichał Górny <mgorny@gentoo.org>
Thu, 28 May 2020 16:33:04 +0000 (18:33 +0200)
committerGitHub <noreply@github.com>
Thu, 28 May 2020 16:33:04 +0000 (18:33 +0200)
Try to make the meaning of platlibdir clear.  The previous wording could
be misinterpreted to suggest that it will be used to find all shared
libraries on the system, and not just Python extensions.  Furthermore,
it was unclear whether it affects third-party (site-packages) extensions
or not.  The new wording tries to make its dual purpose clear,
and provide the additional example of extensions in site-packages.

Doc/library/sys.rst
Doc/whatsnew/3.9.rst
Misc/NEWS.d/3.9.0a5.rst

index 98f63fb83f87a0fdb82207393c45e0d4981fdfb8..880f252f84aa0b9c1a193cc52c3616eee9a67ecd 100644 (file)
@@ -1141,8 +1141,7 @@ always available.
 .. 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.
+   path of standard library and the paths of installed extension modules.
 
    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``
@@ -1153,8 +1152,10 @@ always available.
    * ``/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
+   * ``/usr/lib/pythonX.Y/site-packages/`` (always use ``lib``, not
      :data:`sys.platlibdir`): Third-party modules
+   * ``/usr/lib64/pythonX.Y/site-packages/``:
+     C extension modules of third-party packages
 
    .. versionadded:: 3.9
 
index a42ec09c6532fdc166aba1298aeac6968e4ef2c5..6c3cbbe641b573295a101ca6f78a3cebd1eb0631 100644 (file)
@@ -552,10 +552,9 @@ sys
 ---
 
 Add a new :attr:`sys.platlibdir` attribute: 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.
+library directory. It is used to build the path of standard library and the
+paths of installed extension modules. It is equal to ``"lib"`` on most
+platforms.  On Fedora and SuSE, it is equal to ``"lib64"`` on 64-bit platforms.
 (Contributed by Jan Matějek, Matěj Cepl, Charalampos Stratakis and Victor Stinner in :issue:`1294959`.)
 
 Previously, :attr:`sys.stderr` was block-buffered when non-interactive. Now
index 7e2eaa3a100c26c75af9be7fdfffb27963017639..01cbd4423426edb3e93e8c90f330313eea31389e 100644 (file)
@@ -990,7 +990,7 @@ modules are built.
 Add ``--with-platlibdir`` option to the configure script: name of the
 platform-specific library directory, stored in the new
 :attr:`sys.platlibdir` attribute. It is used to build the path of
-platform-specific dynamic libraries and the path of the standard library. It
+platform-specific extension modules 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. Patch by Jan Matějek, Matěj Cepl,
 Charalampos Stratakis and Victor Stinner.