On 2022-07-21 13:05, Paul Moore wrote:
On Thu, 21 Jul 2022 at 11:33, Thomas Grainger <tagr...@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.py#L145-L148
https://github.com/pypa/pip/blob/main/src/pip/_internal/utils/entrypoints.py#L48

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
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/MBXSULEYVPWUCJ7EW5NQBWJQLJLXJCPZ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to