I think it’s not only sysconfig
, but the site
initialization too. We are aware of the issue, and working on it. Here are some of the relevant CPython issues:
- Allow Python distributors to add custom site install schemes · Issue #88142 · python/cpython · GitHub
- Make the interpreter paths initialization more consistent · Issue #98947 · python/cpython · GitHub
Some related good news, I got some time from $dayjob to work on the new sysconfig API proposal (rough initial draft: sysconfig-build-compilation.md · GitHub). While that doesn’t necessarily fix the issue at hand, I think it will make that much easier, by taking this use-case in account in the API design.
Note: I didn’t read the whole thread, only skimmed it, so it is possible I have missed something.