pipx
pipx copied to clipboard
Support GUI applications (make "gui_scripts" known to pipx)
How would this feature be useful?
The documentation on how pipx works (https://pypa.github.io/pipx/how-pipx-works/) suggests that only functions defined in entry_points as console_scripts are available to pipx after installation.
Having functions defined as gui_scripts available, too, would allow to use pipx for GUI applications.
Describe the solution you'd like
When gui_scripts are defined as entry_points in setup.py, pipx should make those available as known commands on the system.
Describe alternatives you've considered
The alternative seems to be to specify GUI applications as console_scripts, which would always open a terminal when run from a place other than a terminal.
Sounds like a perfectly valid usage to me. Would you be interested in contributing a PR for this?
I just had a look at the actual code, and it seems that pipx already considers gui_scripts (https://github.com/pypa/pipx/blob/04b817c1bc5cf89515b0a2d89a7232c2212e8c70/src/pipx/venv_inspect.py#L70). I haven't verified this yet, but maybe the documentation is just confusing on this?
It could be, I’m not familiar with the exact behaviour either. Could you try locally whether gui_scripts are indeed correctly handled already, and if so, draft some documentation fixes?
PR welcome.
I just validated that pipx exposes gui_scripts via pipx install novelwriter -> novelwriter.
Should just be a matter of improving the docs.