-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desktop integration (linux) #717
Comments
Unfortunately Python packaging does not deal with desktop integration, so this is by-trade out of pipx's scope. You need a "proper" Linux package manager to achieve this (e.g. APT or Yum depending on your distribution of preference). So you need to ask Spyder to package alternative distributions for those functionalities. #711 is not related; gui-scripts are only relevant on Windows (it's related to how Windows distinguish between "console mode" and "GUI mode" programs) and have no functional differences to console-scripts on POSIX platforms. There are some discussions on this (in a broader scope) on Discourse but I don't see the idea gaining much traction. It is fundamentally not particularly compatible with language-specific packaging (not just Python) IMO. |
From what I can see, spyder's setup.py does deal with desktop integration. I.e. it puts the expected files into .../share/... . Its just that with pipx, this is inside the venv instead of in the usual place. |
That's basically what's discussed in the Discourse thread I linked to, and from what I can tell the concensus is that package shouldn't be able to install outside a virtual environment. I guess the best pipx can do is to copy those files to somewhere like |
(And we can make that path configurable so you can point it to your |
yes, basically that. I read the discourse comment, one thought is that part of the purpose of pipx is to make a binary inside a virtual env (appear to be) available outside that venv. |
@eliotb You should take a look at desktop-app. I only needed my GUI application to show its own icon instead of showing the Python application, but you can do stuff like add shortcuts etc. |
IMHO out of scope for this project. |
A major pain point here is not due to pip nor pipx. It is that the Wayland protocols do not support some things that X11 used to support and that are taken for granted in other OSes. Specifically, Qt's While all this may not be an issue for pip and virtualenvs, IMHO for pipx the situation is slightly different. In fact, pipx is meant to touch suff out of the virtual environments and specifically to touch stuff in |
I was helping someone to install "spyder" the GUI IDE on linux. The installation goes fine and the app can be run by typing "spyder" in a terminal, but it is not available in the list of applications in the gui desktop (gnome in this case).
Looking inside the
.local/pipx/venv/spyder
, it comes with the required pieces to enable desktop integration.share/applications/spyder.desktop
share/icons/spyder.png
Linking these two files into their respective locations inside
.local/share
enables the application to appear in the gnome app selector. I kind of see this as an extension of the idea of linking the binary into.local/bin
I'm not sure if this is within scope for pipx, either as part of install possibly with option e.g.
--desktop-integration
, or as a separate command. I don't know if there is something similar for windows and mac...This may be slightly related to #711.
The text was updated successfully, but these errors were encountered: