
On 2022-07-21 13:05, Paul Moore wrote:
On Thu, 21 Jul 2022 at 11:33, Thomas Grainger <tagrain@gmail.com>
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).
I ran a grep Scripts in a freshly created venv and I do get quite many hits. Even pip is hard coded: https://github.com/pypa/pip/blob/main/src/pip/_internal/locations/_distutils... https://github.com/pypa/pip/blob/main/src/pip/_internal/utils/entrypoints.py... It also creates files which seems to come from Py 3 standard lib. venv/Lib/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg And this is just considering pip and setuptools... I see now that this proposal is futile, and I'm backing down. I'd wish it thou, but we're too committed to the existing design choices and that ship has sailed. Best regards, Svein