[issue29585] site.py imports relatively large `sysconfig` module.

Marc-Andre Lemburg report at bugs.python.org
Fri Feb 17 06:45:59 EST 2017


Marc-Andre Lemburg added the comment:

I don't think rewriting party of site.py in C is a good idea. It's a rather maintenance intense module.

However, optimizing access is certainly something that's possible, e.g. by placing the few variables that are actually needed by site.py into a bootstrap module for sysconfig, which only contains the few variables needed by interpreter startup.

Alternatively, sysconfig data could be made available via a C lookup function; with the complete dictionary only being created on demand. get_config_var() already is such a lookup API which could be used as front-end.

----------
nosy: +lemburg

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29585>
_______________________________________


More information about the Python-bugs-list mailing list