-
Notifications
You must be signed in to change notification settings - Fork 14
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
Consider making D-Bus support install optional #65
Comments
Current conclusionsI'm leaning towards deciding the path B, more specifically to option B4. A1: This makes the most common path more complex for making the path for power-users easier. |
I would like to release the 0.8.0 as soon as possible, and making decision about this can wait a bit longer. If dbus library (jeepney) install is made optional, that must be done only after there are some working methods on linux which do not require dbus. More methods will be added in the subsequent releases. Removing this from 0.8.0 milestone. |
Currently wakepy supports KDE + GNOME + "freedesktop compiant DEs" (those which implement the org.freedesktop.PowerManagement and org.freedesktop.ScreenSaver dbus APIs. This could be a path for wakepy being dependency free (optionally depending on jeepney):
The above would give support already to 82.1% of linux desktop users (if linux-hardware.org stats are taken as truth). The unsupported portion would be 7.2% (LXQt, i3, COSMIC, Hyprland + others), and unknown portion would be 10.7%. Another (additional) thing to consider is the possibility to use the dbus-python package (import name: |
Wakepy has one dependency on linux: jeepney, which provides dbus support. There are yet no D-Bus free methods on linux, but there is a ticket (#64) for searching for such methods on GNOME.
It could be possible to either:
A) Make just the necessities install by default and have special options for adding something.
B) Make everything install by default and have special options for leaving something out
Alternative A1
Consider making the jeepney dependency optional. This means,
would install only wakepy and nothing else, ever. Trying to use wakepy when non-DBus based methods are not available, would not succeed:
Installing:
would install the supported dbus package (jeepney).
Pros:
Cons:
Alternative B1
Keep installing a dbus python package by default when running
Users can opt-out from the dbus with
Pros:
Cons:
--no-deps
in requirements.txt (or setup.py?); Users wanting to opt-out need to install wakepy separately.pip install wakepy[some-extra]
Alternative B2
Ideally,
pip install wakepy
would install wakepy with DBus and there would be another extras which would remove the dbus python package dependency:This would be super handy as only experienced users might want to drop out this dependency. Unfortunately this does not seem to be supported by pip.
Pros:
Cons:
Alternative B3
Taken from a SO answer: Use environment variables to determine the D-Bus need. It could be either
or making use of the
DBUS_SESSION_BUS_ADDRESS
which should be set in most of the cases if D-Bus is available (if that is set, install D-Bus dependencies automatically, otherwise not). The example had asetup.py
file like this:I'm not sure if this would be possible with pyproject.toml or not.
Pros:
Cons:
Alternative B4
Make
to install the default set of dependencies. Jeepney (or some other dbus python package) would be automatically included on systems like linux. This is because an average user should not have to think more than
pip install wakepy
. Behind the scenes this would install somewakepy-vanilla
which is the base version and then for examplejeepney
for dbus. In the future, this default set could evolve, but users could rely on the fact that anything needed for the typical use case is installed automaticlaly. This would not be same as installing "ALL" possible extras, like somemove-mouse-package
(does not exist). Then, power users could then useFor installing the vanilla version, or even using
wakepy-vanilla[dbus]
for just dbus extras.Motivation
pip install wakepy
did not install a required package for their system and that when setting the wakelock, there was no exceptions and they have to dig out the documentation to see why their system is still going to sleep.Pros:
Cons:
Edit: Renamed alternatives (A, B, C, D) to (A1, B1, B2, B3). Added alternative B4.
The text was updated successfully, but these errors were encountered: