diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-12-02 19:03:14 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-12-02 20:30:25 +0100 |
commit | 26ce14555e7afbf847ec62d9f09a3e62ca658653 (patch) | |
tree | a9993b6b8d1ef8d3da0b1fa093cd48d8e803de7f /x11-wm/qtile | |
parent | dev-python/pywlroots: Put := on cffi to prevent automagic rebuilds (diff) | |
download | gentoo-26ce14555e7afbf847ec62d9f09a3e62ca658653.tar.gz gentoo-26ce14555e7afbf847ec62d9f09a3e62ca658653.tar.bz2 gentoo-26ce14555e7afbf847ec62d9f09a3e62ca658653.zip |
x11-wm/qtile: Bump to 0.23.0
Thanks to Etn40ff for the initial work.
Closes: https://bugs.gentoo.org/914655
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'x11-wm/qtile')
-rw-r--r-- | x11-wm/qtile/Manifest | 1 | ||||
-rw-r--r-- | x11-wm/qtile/files/qtile-0.23.0-keyring.patch | 52 | ||||
-rw-r--r-- | x11-wm/qtile/qtile-0.23.0.ebuild | 113 |
3 files changed, 166 insertions, 0 deletions
diff --git a/x11-wm/qtile/Manifest b/x11-wm/qtile/Manifest index ba5de5f4a39b..ffef237185f4 100644 --- a/x11-wm/qtile/Manifest +++ b/x11-wm/qtile/Manifest @@ -1 +1,2 @@ DIST qtile-0.22.1.tar.gz 488969 BLAKE2B 3b2fce587ae39570997b503cb386314160dbefa39b1ef65dc2ff5bc2f1167251224a0f298ef8e374d0d4c034d1e5012251f96b92ce5cb74d7fd93320e14ff8bf SHA512 944ec27b5d227154624fa2a15a0840b748307a1e79ab52ccf3384763111459b3c4d26b4677f8e2ea51634206dc6d1e32e057e057db917b3705ce583d83a8056d +DIST qtile-0.23.0.tar.gz 524536 BLAKE2B 9cf5b0cdffd7bc95ab7649827c221b20718f9dcc19b8ae2a50ceac5df3d71b117eef493a40523d81e60c8bc54b2103bc2a93775fcb20c025ec1dd84f9d809a19 SHA512 d6886df8efefacf90b1a5ec487c9a5a90414593900159213a218d638ef4f018b69284fe2cea707da12655a9736aad3df74a338a60344536e4d7eebcc9fc1090b diff --git a/x11-wm/qtile/files/qtile-0.23.0-keyring.patch b/x11-wm/qtile/files/qtile-0.23.0-keyring.patch new file mode 100644 index 000000000000..c4a44efd8791 --- /dev/null +++ b/x11-wm/qtile/files/qtile-0.23.0-keyring.patch @@ -0,0 +1,52 @@ +From 84eaf6b70f9569c88534dc8054e19f05fa3137e2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sat, 2 Dec 2023 17:40:50 +0100 +Subject: [PATCH] imapwidget: Do not pass None as username to + keyring.get_password() + +Ensure not to pass `None` as the username to `keyring.get_password()`, +as the API requires it to always be a `str` and some backends +(particularly `keyrings-alt`) crash on `None`. + +Fixes #4609 +--- + libqtile/widget/imapwidget.py | 3 +++ + test/widgets/test_widget_init_configure.py | 1 + + 2 files changed, 4 insertions(+) + +diff --git a/libqtile/widget/imapwidget.py b/libqtile/widget/imapwidget.py +index 3f84d9e7..c8a6ec0e 100644 +--- a/libqtile/widget/imapwidget.py ++++ b/libqtile/widget/imapwidget.py +@@ -24,6 +24,7 @@ import re + + import keyring + ++from libqtile.confreader import ConfigError + from libqtile.log_utils import logger + from libqtile.widget import base + +@@ -75,6 +76,8 @@ class ImapWidget(base.ThreadPoolText): + def __init__(self, **config): + base.ThreadPoolText.__init__(self, "", **config) + self.add_defaults(ImapWidget.defaults) ++ if self.user is None: ++ raise ConfigError("You must set the 'user' parameter for the IMAP widget.") + password = keyring.get_password("imapwidget", self.user) + if password is not None: + self.password = password +diff --git a/test/widgets/test_widget_init_configure.py b/test/widgets/test_widget_init_configure.py +index 83a9cb9a..aa7a1f9b 100644 +--- a/test/widgets/test_widget_init_configure.py ++++ b/test/widgets/test_widget_init_configure.py +@@ -58,6 +58,7 @@ extras = [ + + # To skip a test entirely, list the widget class here + no_test = [widgets.Mirror, widgets.PulseVolume] # Mirror requires a reflection object ++no_test += [widgets.ImapWidget] # Requires a configured username + + # To test a widget only under one backend, list the widget class here + exclusive_backend = { +-- +2.43.0 + diff --git a/x11-wm/qtile/qtile-0.23.0.ebuild b/x11-wm/qtile/qtile-0.23.0.ebuild new file mode 100644 index 000000000000..363086be9131 --- /dev/null +++ b/x11-wm/qtile/qtile-0.23.0.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..11} ) + +inherit distutils-r1 pypi + +DESCRIPTION="A full-featured, hackable tiling window manager written in Python" +HOMEPAGE=" + https://qtile.org/ + https://github.com/qtile/qtile/ + https://pypi.org/project/qtile/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="pulseaudio wayland" + +RDEPEND=" + >=dev-python/cairocffi-1.6.0[${PYTHON_USEDEP}] + >=dev-python/cffi-1.1.0:=[${PYTHON_USEDEP}] + dev-python/dbus-next[${PYTHON_USEDEP}] + dev-python/pygobject[${PYTHON_USEDEP}] + >=dev-python/six-1.4.1[${PYTHON_USEDEP}] + >=dev-python/xcffib-1.4.0[${PYTHON_USEDEP}] + x11-libs/cairo[X,xcb(+)] + x11-libs/libnotify[introspection] + x11-libs/pango + pulseaudio? ( + dev-python/pulsectl-asyncio[${PYTHON_USEDEP}] + media-sound/pulseaudio + ) + wayland? ( + >=dev-python/pywlroots-0.16[${PYTHON_USEDEP}] + ) +" +BDEPEND=" + dev-python/cffi[${PYTHON_USEDEP}] + dev-python/setuptools-scm[${PYTHON_USEDEP}] + test? ( + media-gfx/imagemagick[X] + x11-base/xorg-server[xephyr] + ) + wayland? ( + >=dev-python/pywlroots-0.16[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +python_prepare_all() { + local PATCHES=( + # https://github.com/qtile/qtile/pull/4610 + "${FILESDIR}/${P}-keyring.patch" + ) + + sed -e "s/can_import(\"wlroots.ffi_build\")/$(usex wayland True False)/" \ + -i setup.py || die + + # some tests expect bin/qtile + mkdir bin || die + cat >> bin/qtile <<-EOF || die + #!/bin/sh + exec qtile "\${@}" + EOF + chmod +x bin/qtile || die + + distutils-r1_python_prepare_all +} + +src_compile() { + local -x CFFI_TMPDIR=${T} + distutils-r1_src_compile +} + +python_test() { + local EPYTEST_DESELECT=( + # mocking doesn't seem to work + test/widgets/test_mpd2widget.py + # checks fail with mypy errors + test/test_check.py + # migration tests require intact source tree + test/test_migrate.py + # no clue ("ExistingWMException") + test/test_restart.py::test_restart_hook_and_state + ) + + # force usage of built module + rm -rf libqtile || die + + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + nonfatal epytest --backend=x11 $(usev wayland '--backend=wayland') || + die -n "Tests failed with ${EPYTHON}" +} + +python_install_all() { + local DOCS=( CHANGELOG README.rst ) + distutils-r1_python_install_all + + insinto /usr/share/xsessions + doins resources/qtile.desktop + + insinto /usr/share/wayland-sessions + doins resources/qtile-wayland.desktop + + exeinto /etc/X11/Sessions + newexe "${FILESDIR}"/${PN}-session-r1 ${PN} +} |