This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2021-01-18.10:15:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610964917.23.0.947461196433.issue42955@roundup.psfhosted.org>
In-reply-to
Content
On Fedora 33, the stdlib lives in two main directories:

* /usr/lib64/python3.9: Python modules
* /usr/lib64/python3.9/lib-dynload: C extension modules

Example:

>>> import os.path
>>> os.path.dirname(os.__file__) # Python
'/usr/lib64/python3.9'
>>> os.path.dirname(_asyncio.__file__)
'/usr/lib64/python3.9/lib-dynload'

The Python stdlib path can be retrieved with:

>>> import sysconfig; sysconfig.get_paths()['stdlib']
'/usr/lib64/python3.9'

But I'm not sure how to retrieve /usr/lib64/python3.9/lib-dynload path. "platstdlib" is not what I expect:

>>> import sysconfig; sysconfig.get_paths()['platstdlib']
'/usr/lib64/python3.9'

I found DESTDIR in Makefile:

>>> sysconfig.get_config_var('DESTSHARED')
'/usr/lib64/python3.9/lib-dynload'
History
Date User Action Args
2021-01-18 10:15:17vstinnersetrecipients: + vstinner
2021-01-18 10:15:17vstinnersetmessageid: <1610964917.23.0.947461196433.issue42955@roundup.psfhosted.org>
2021-01-18 10:15:17vstinnerlinkissue42955 messages
2021-01-18 10:15:17vstinnercreate