Message385181
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' |
|
Date |
User |
Action |
Args |
2021-01-18 10:15:17 | vstinner | set | recipients:
+ vstinner |
2021-01-18 10:15:17 | vstinner | set | messageid: <1610964917.23.0.947461196433.issue42955@roundup.psfhosted.org> |
2021-01-18 10:15:17 | vstinner | link | issue42955 messages |
2021-01-18 10:15:17 | vstinner | create | |
|