Closed Erovia closed 4 years ago
On the subject of segfaults on crashes, it has sadly been there since conception. I honestly have no idea what part of it is crashing and haven't been inclined to chase it as it's a crash on exit.
On the other hand I'm unconvinced on what will be gained by using pip as I've never used it and it feels like a niche use case where I am more inclined to make this easily accessible via traditional package managers. This isn't a 'no' outright mind you :)
I honestly have no idea what part of it is crashing and haven't been inclined to chase it as it's a crash on exit.
I briefly looked at the coredump, but I can't say I'm familiar with Qt.
Maybe something is not cleaned up or not in proper order? :man_shrugging:
it feels like a niche use case
I would disagree with calling the "official" way of installing Python modules a niche thing. :)
I am more inclined to make this easily accessible via traditional package managers.
I don't think the 2 are mutually exclusive. A lot of useful programs are packaged by distros from PyPI.
Personally, I like to keep the different Python projects in different virtualenvs. Without pip
, it's troublesome. Actually, currently it will not even start in a virtualenv, since the shebang (#!/usr/bin/python3
) will not call the virtualenv's interpreter.
Installing with pip
is also distro (and platform) agnostic.
Another benefit is registering the script as a "console script", so the user can use it like any other console program: $ discord-overlay
.
tl;dr: I believe there is value in using Python's standard package management and it's not mutually exclusive with having packaged for different distros.
Probably won't surprise anyone reading my code/commits that this is my first time using Qt.
You've sold me on it, if it doesn't affect launch from console & .desktop file.
Running from console becomes easier (no need to set executable bit or specifying interpreter). The desktop file might need some work. But the path depends on how the users installs it.
You can test the whole stuff in a virtualenv. You can pip install .
in the directory with the setup.py
.
A few other things worth trying if you are not familiar with pip:
pip install --user .
will installs to $HOME/.local/bin
so no root
permission is needed (but Ubuntu/Debian is slow to fix their bugs... https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562)pip install [--user] -e .
will allow you to edit your files/fix bugs and those changes will instantly be reflected in the installed program.I've also rebased the changes on the current master, so your commits from today are present.
Thank you!
Made some changes, so installing with
pip
and even publishing to PyPI.org is possible.All dependencies can be pulled from PyPI, so this is also a distro-independent installation method.
Note: I'm getting segfaults upon closing the program on Fedora 31 with Gnome/X11. I'm not sure if the libraries pulled from PyPI are newer than this program was designed to work with or something else.
#0 0x00007f8e45c8f2e7 n/a (/home/erovia/virtualenvs/dol/lib/python3.7/site-packages/PyQt5/Qt/lib/libQt5Widgets.so.5)