
There is a *lot* of code that depends on the Windows directory being "Scripts". There have been proposals in the past to change it (sorry, no links but it has come up a few times on the various packaging forums), but it simply breaks too much for too little gain. If you're serious about wanting this, and the gain to you is sufficient to justify the work, I'd suggest reviewing as many packaging tools as you can find (virtualenv, venv, pip, setuptools, pipenv, pipx, poetry, hatch, pew, as well as core Python in the sysconfig module and distutils would be a good starting point). Work out what changes would be needed to all of these to support using "bin" on Windows, being sure to work out how to handle backward compatibility - people will still have environments that use "Scripts" for many years to come, even if we change everything, and most of the tools I mentioned need to support Python back to at least version 3.7, if not earlier. Even after doing all of that, you'd likely *still* have a huge issue to address, which is all of the various personal and in-house utilities that never get published anywhere, but which either hard code the "if Windows, then Scripts else bin" test, or simply use whichever value is appropriate for the platform they run on (there may be no need for portability anyway). 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. But at that point no-one will care, because they don't ever reference the actual location, they just use the API anyway :-) Paul On Thu, 21 Jul 2022 at 00:53, Svein Seldal <sveinse@seldal.com> wrote:
Using py in the three OS-es (unix-like, Mac and Win) has become very similar in the last years, which is great. Making portable py code has become very easy. However, there is one peculiarity in Win which I find annoying: virtual environments insists on placing executables in the `Scripts` directory, while the other platforms use `bin`. This forces portable scripts and programs on the outside of py to be OS-aware in order to interact with a venv on a Win-system vs other systems.
I would like to proposing the ability to configure virtual environments to use `bin` directory for executable on Windows. Personally I think it would be smart move if it were changed to `bin` as default, making all py platform act consistently. However, I do understand that there might be existing code out there that depend on using `Scripts`.
Best regards, Svein _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@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/5OFYP7... Code of Conduct: http://python.org/psf/codeofconduct/