Skip to content
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

GUI entry point doesn't work #18

Open
demberto opened this issue Mar 6, 2022 · 4 comments
Open

GUI entry point doesn't work #18

demberto opened this issue Mar 6, 2022 · 4 comments

Comments

@demberto
Copy link

demberto commented Mar 6, 2022

OS: Windows 10 21H2 64-bit
Python: 3.10.0

This is my package dycall.

When I installed it with pip, the entry-point dycall-gui does nothing, no error messages nothing at all.

Then I install it with desktop-app install dycall. I see a shortcut pointing to dycall-gui.exe so its useless and as expected it doesn't work either, no messages or errors.

However python -m dycall works but if that is the only thing that works, I'd rather stop using desktop-app, its no use. Plus it keeps the Python interpreter window open

Am I doing something wrong?

@demberto
Copy link
Author

demberto commented Mar 6, 2022

EDIT: My mistake, turns out I followed your oink example blindly and used desktop_app:entry_point instead of my app's entry point

@demberto demberto closed this as completed Mar 6, 2022
@chrisjbillington
Copy link
Owner

chrisjbillington commented Mar 6, 2022

Apologies for the lack of documentation - this project mostly serves the needs of another project, so I never got around to properly documenting it though it in working order for the way the other project uses it at least.

Actually, you are supposed to point it to desktop_app:entry_point. desktop-app's entrypoint figures out what module's __main__.py to run based on the entry point name, which should be the name of the module - I can see you got that correct so it should have worked.

I do see a typo in your setup.cfg, dycall = deskto-app.json should be dycall = desktop-app.json, but I wouldn't have thought that would break it in the way you described - I'm pretty sure it should fall back to defaults if that file doesn't exist.

If you've pointed it to your own entry points, then that should work as well, so if you're happy with that then that's great. The reason why desktop-app has its own entry point is so that it carun the -gui entry points on Windows with python.exe and a hidden console instead of pythonw.exe (to avoid various issues caused by stdout/stderr not existing on the latter), and to activate environments - which is only really necessary for conda environments on Windows. If you don't care about these things then it's no problem not using desktop-app's entry point and only using desktop-app install to create launchers and do the appid stuff to make the taskbar icons sensible.

If you do want these desktop-app entrypoint features, I'll try to reproduce your issue and figure out what the problem is. I notice you're using test PyPI - if the method you used to test installing dycall with pip was also via test PyPI, that might have pulled in a version of desktop-app from test PyPI as well - and who knows whether that's in working condition, I am not sure of the state of the packages I last uploaded there.

@demberto
Copy link
Author

demberto commented Mar 6, 2022

this project mostly serves the needs of another project
There's no equivalent project outside which does what desktop-app does. In fact anyone developing a GUI application with Python (regardless of the GUI framework) can use this library.

I can see you got that correct so it should have worked.
Correct, how? Why doesn't `desktop-app's entrypoint work as exepcted?

I do see a typo in your setup.cfg, dycall = deskto-app.json should be dycall = desktop-app.json
That's really wierd, because if you check the bdist or sdist it does have desktop-app.json inside it. I don't know how it got their automagically. Thanks for pointing out.

The limits imposed by using my own entry point don't really matter. Also what about Mac? Does desktop-app silently ignore any configuration it finds or raises exceptions? Or do I need to place import guards myself?

@demberto demberto closed this as completed Mar 6, 2022
@demberto demberto reopened this Mar 6, 2022
@demberto
Copy link
Author

demberto commented Mar 6, 2022

Sorry I closed by mistake, upto you what to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants