qtile / qtile

:cookie: A full-featured, hackable tiling window manager written and configured in Python (X11 + Wayland)
http://qtile.org
MIT License
4.7k stars 690 forks source link

Development environment does not get set up correctly #4858

Open bendi-github opened 1 month ago

bendi-github commented 1 month ago

Issue description

Steps to reproduce:

As far as I understand this should have set up my development environment. Expected behavior: The following commands do not fail.

Observed behavior:

(venv) [user@computer qtile]$ ./scripts/ffibuild -v
    Failed!
    This is optional and is needed for: Wayland backend
Traceback (most recent call last):
  File "/home/user/programming/qtile/./libqtile/backend/wayland/cffi/build.py", line 1, in <module>
    import wlroots.ffi_build as wlr
ModuleNotFoundError: No module named 'wlroots'
(venv) [user@computer qtile]$ ./scripts/ffibuild -v
    Failed!
    This is optional and is needed for: Wayland backend
Traceback (most recent call last):
  File "/home/user/programming/qtile/./libqtile/backend/wayland/cffi/build.py", line 1, in <module>
    import wlroots.ffi_build as wlr
ModuleNotFoundError: No module named 'wlroots'

When pywlroots is manually installed pip install pywlroots (in venv), the error changes to

(venv) [user@computer qtile]$ ./scripts/ffibuild -v
    Failed!
    This is optional and is needed for: Wayland backend
Traceback (most recent call last):
  File "/home/user/programming/qtile/./libqtile/backend/wayland/cffi/build.py", line 4, in <module>
    from libqtile.backend.wayland.cffi import cairo_buffer, libinput
ModuleNotFoundError: No module named 'libqtile'

As is evident from my prompt, I am running the scripts from the root directory of the project.

System: Arch Linux x86_64 Wayland compositor: Hyprland Kernel: 6.9.2-arch1-1 System python version: Python 3.12.3 Shell used for testing: bash

[user@computer ~] pacman -Qs "pytest|pre-commit"
local/pre-commit 3.7.1-1
    A framework for managing and maintaining multi-language pre-commit hooks
local/python-pytest 1:8.2.1-1
    Simple powerful testing with Python
local/texlive-binextra 2024.2-2 (texlive)
    TeX Live - TeX auxiliary programs
[user@computer ~] pacman -Qi wlroots
Name            : wlroots
Version         : 0.17.3-1
Description     : Modular Wayland compositor library
Architecture    : x86_64
URL             : https://gitlab.freedesktop.org/wlroots/wlroots
Licenses        : MIT
Groups          : None
Provides        : libwlroots.so=12-64

4225 also seems to have issues with the development environment

Version

N/A

Backend

Wayland (experimental)

Config

No response

Logs

No response

Required

tych0 commented 1 month ago

I think perhaps we could use a requirements-wayland.txt? Or perhaps just a hard coded list in dev.sh.

In terms of missing libqtile... that is strange. I guess virtualenv doesn't add PWD to the PYTHONPATH?