STINNER Victor <[email protected]> added the comment:
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'
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue42955>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com