qtile icon indicating copy to clipboard operation
qtile copied to clipboard

Drop hard xcffib requirement, document pip install options

Open m-col opened this issue 3 years ago • 3 comments

This drops xcffib as a requirement for all users and prevents it from being installed when performing pip install qtile. Instead, x11 or wayland dependencies can be installed alongside qtile using install options as defined in setup.cfg, currently already the case for wayland (though undocumented). Specifically, these commands can be used:

pip install qtile[x11]
pip install qtile[wayland]

Not specifying an option will only install actual hard dependencies i.e. cffi and cairocffi.

This is documented front and centre at the top of the installation page as a quick summary which I suspect will be sufficient for many users who probably don't want to read the whole page!

m-col avatar Aug 17 '22 23:08 m-col

This is a great idea.

For X11, does xcffib still get installed before cairocffi?

elParaguayo avatar Aug 18 '22 05:08 elParaguayo

If they aren't already installed, they will be installed in order. This is ensured by the (already present) install_requires dependency in setup.cfg for cairocffi[xcb], which tells cairocffi to install with xcffib support.

If cairocffi is already installed but isn't built with xcffib support, then installation will print out a warning message and advice from setup.py. This already is the case and when it happens installation is blocked. This PR does change this so that installation continues (warning message still prints). The reasoning for that change is because that advice only needs to be followed if xcffib is needed i.e. the user wants to use the x11 backend. The warning message is updated to clarify this so that users who are only after using wayland can ignore it.

Reading this again I actually should update install_requires so that cairocffi[xcb] is just cairocffi, then add cairocffi[xcb] to the x11-only requirements

m-col avatar Aug 19 '22 12:08 m-col

Ah, more changes are required:

(.venv)  ~/git/qtile ▋▌▍ ./scripts/wephyr
Traceback (most recent call last):
  File "/home/mcol/git/qtile/bin/qtile", line 33, in <module>
    from libqtile.scripts.main import main  # noqa: E402
  File "/home/mcol/git/qtile/libqtile/scripts/main.py", line 6, in <module>
    from libqtile.scripts import check, cmd_obj, migrate, run_cmd, shell, start, top
  File "/home/mcol/git/qtile/libqtile/scripts/check.py", line 27, in <module>
    from libqtile import confreader
  File "/home/mcol/git/qtile/libqtile/confreader.py", line 31, in <module>
    from libqtile.backend.x11 import core
  File "/home/mcol/git/qtile/libqtile/backend/x11/core.py", line 31, in <module>
    import xcffib
ModuleNotFoundError: No module named 'xcffib'

There are a couple of dependency-related changes that are needed really, similarly https://github.com/qtile/qtile/pull/3602

m-col avatar Aug 19 '22 12:08 m-col

This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Feb 15 '23 20:02 github-actions[bot]

This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Aug 25 '23 04:08 github-actions[bot]

@m-col if you want to keep it open you need to add a kind: ... label

ramnes avatar Oct 24 '23 20:10 ramnes