Draft: script: hg as a standard console-script Python entry point
For now, this is an experimental MR, just to see how much it is broken.
Using a console-script Python entry point would be simpler and more standard so few standard things would just work as for other Python applications, for example install with pipx or UV.
Moreover, we currently need to add python libraries in the wheels on Windows, which is non standard, make the wheels quite big and seems to lead to issues on Python 3.13.
As discussed in https://discuss.python.org/t/about-exe-wrappers-created-by-frontends-when-installing-wheels-on-windows/75942, there are few possible issues with using a console-script entry point:
-
PYTHONLEGACYWINDOWSSTDIO=1
It seems that this could be done from Python (!1193)
-
The long path manifest.
From the answers in the thread, it should be fine because python.exe has it. Note also that removing the long path manifest from hg.exe in the wheels does not prevent us from including it in hg.exe in native Windows application.