site.py uses sysconfig (and sysconfigdata, _osx_support) module for user-site package.
But sysconfig module is not so lightweight, and very rarely used.
Actually speaking, only tests and distutils uses sysconfig in stdlibs.
And it takes about 7% of startup time, only for searching user-site path.
I tried to port minimal subset of sysconfig into site.py (GH-136).
But 'PYTHONFRAMEWORK' is only in sysconfigdata. So I couldn't get rid sysconfig dependency completely.
How can I do to solve this?
a) Drop "osx_framework_user" (`~/Library/Python/3.7/`) support completely.
b) Add "sys._osx_framework" attribute
c) Create minimal sysconfigdata only for site.py
d) anything else? |