
On Thu, 21 Jul 2022 at 11:33, Thomas Grainger <tagrain@gmail.com> wrote:
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
In theory, yes. In practice, if that worked, we wouldn't get people asking about changing this in the first place... Non-Python programs can get the script location from sysconfig using py -c "import sysconfig; print(sysconfig.get_path('scripts'))" But yes, it's likely that sysconfig *is* that API - it's just that for whatever reason, people haven't adopted it well enough that we can afford to change the location without breaking things. Which makes this more of a social problem than a technical one (get people to use sysconfig and the problem goes away). Paul