This fixes the broken "Linux (AppImage)" CI job.
PyGObject 3.47 has dropped setuptools in favor of meson-python, which
isn't a problem per se, but they also require meson 0.63.3, which we
don't currently have in the repositories of Ubuntu 20.04, which is
the oldest (yet supported) version we use to build our AppImage
package, in order to increase compatibility with as much Linux distros
as possible.
And since there's no real, compelling reason to upgrade to the latest
version of PyGObject right now, let's just pin it to version <3.46,
until we eventually upgrade the Ubuntu version we use for CI.
Because Linux distributions don't have an 'universal' path for the
system certificate store, bundling libssl built on distro A might not
work on distro B, because distros tend to change path to the
certificate store at build time.
This means that creating a PyInstaller package on Ubuntu will include
the libssl built there, and if you try to run this package on a
different distro (e.g. Arch Linux), any attempt to create an SSL
connection will fail, because Arch Linux has a different path for the
certificate store than Ubuntu.
This issue is usually worked around by bundling certificates with the
app (usually using certifi), and then pointing the SSL_CERT_FILE
environment to it.
However, truststore seems to be a better alternative, since it tries to
use the certificate store from the system instead.
The list of benefits are listed on the project's page on GitHub:
https://github.com/sethmlarson/truststore
On Linux, pystray's icon.stop() currently doesn't work well with the
AppIndicator backend.
So, instead of destroying the icon when the user restores from tray
(only to later re-create it when the user minimizes to tray again), we
have the option to control the icon's visibility instead! Luckily, that
works on Windows too!
Note that for this change to work properly on Linux, we need to switch
to the master version of pystray, because we need this specific fix:
https://github.com/moses-palmer/pystray/commit/5943ed4e19be48224cf39b70444de8ffe22c23ce
After pystray releases a version newer than 0.19.4, we can switch back.
Co-authored-by: DevilXD <bartosz.peszek@gmail.com>