# Maintainer: David Runge pkgname=qtile pkgver=0.22.1 pkgrel=4 pkgdesc="A full-featured, pure-Python tiling window manager" arch=(x86_64) url="http://www.qtile.org" license=(MIT) depends=( gdk-pixbuf2 glibc libnotify librsvg pango python python-cairocffi python-cffi python-xcffib python-gobject wlroots0.15 libwlroots.so=10 ) makedepends=( git libpulse python-build python-installer python-setuptools-scm python-wheel ) checkdepends=( graphviz gtk3 imagemagick lm_sensors procps-ng python-bowler python-dbus-next python-gobject python-pytest python-pywlroots python-xdg xorg-server-xephyr xorg-server-xvfb xorg-xrandr xorg-xwayland ) optdepends=( 'alsa-utils: for volume widget' 'canto-daemon: for canto widget' 'cmus: for cmus widget' 'jupyter_console: for interaction with qtile via Jupyter' 'khal: for khal_calendar widget' 'libpulse: for pulse_volume and pulseaudio_ffi widget' 'lm_sensors: for sensors widget' 'moc: for moc widget' 'python-bowler: for migrating configuration files' 'python-dbus-next: for utils, notifications and several widgets' 'python-iwlib: for wlan widget' 'python-keyring: for imapwidget widget' 'python-mpd2: mpd2widget widget' 'python-psutil: graph, net and memory widget' 'python-pywlroots: for experimental wayland support' 'python-setproctitle: change process name to qtile' 'python-xdg: launchbar widget' 'xorg-xwayland: for XWayland support' ) install=$pkgname.install source=(git+https://github.com/qtile/qtile#tag=v$pkgver?signed) sha512sums=('SKIP') b2sums=('SKIP') validpgpkeys=( '3CCAB226289DE0160C61BDB418D18F1BC464DCA3' # Tycho Andersen '35D92E7CC7357A81173EA1C974F9FDD20984FBEC' # Matt Colligan 'A6BAA1E17D2664ADB97B2C6F58A9AA7C86727DF7' # elParaguayo ) build() { export CFLAGS="$CFLAGS -I/usr/include/wlroots0.15" export LDFLAGS="$LDFLAGS -L/usr/lib/wlroots0.15" cd $pkgname ./scripts/ffibuild python -m build --wheel --no-isolation } check() { local pytest_options=( -vv --backend x11 --backend wayland # disable failing tests (for Python 3.11): https://github.com/qtile/qtile/issues/4229 --deselect test/widgets/test_statusnotifier.py::test_statusnotifier_defaults[1-x11] --deselect test/widgets/test_statusnotifier.py::test_statusnotifier_defaults[1-wayland] --deselect test/widgets/test_statusnotifier.py::test_statusnotifier_defaults_vertical_bar[1-x11] --deselect test/widgets/test_statusnotifier.py::test_statusnotifier_defaults_vertical_bar[1-wayland] --deselect test/widgets/test_statusnotifier.py::test_statusnotifier_icon_size[1-x11-sni_config0] --deselect test/widgets/test_statusnotifier.py::test_statusnotifier_icon_size[1-wayland-sni_config0] ) local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])") cd $pkgname # install to temporary location, as importlib is used python -m installer --destdir=test_dir dist/*.whl export LC_TYPE=en_US.UTF-8 export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH" pytest "${pytest_options[@]}" } package() { cd $pkgname python -m installer --destdir="$pkgdir" dist/*.whl # license install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" # config install -vDm 644 libqtile/resources/default_config.py -t "$pkgdir/usr/share/doc/$pkgname/" # desktop files install -vDm 644 "resources/$pkgname.desktop" -t "$pkgdir/usr/share/xsessions/" install -vDm 644 "resources/$pkgname-wayland.desktop" -t "$pkgdir/usr/share/wayland-sessions/" # docs install -vDm 644 {CHANGELOG,README.rst} -t "$pkgdir/usr/share/doc/$pkgname/" }