Skip to content

[3.9] bpo-1294959: Try to clarify the meaning of platlibdir (GH-20332) #20497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Doc/library/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand All @@ -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

Expand Down
7 changes: 3 additions & 4 deletions Doc/whatsnew/3.9.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.9.0a5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down