
July 21, 2022
10:29 a.m.
A practical approach may be to develop some form of library that "hides" the difference behind some form of API for finding the correct value, get that added to the stdlib and wait a few years until it's adopted everywhere (because it's so well-designed and convenient ;-)) Then, you can change the location.
Is this the canonical location of this information? https://github.com/python/cpython/blob/3.10/Lib/sysconfig.py#L56