From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5B906158010 for ; Thu, 12 Jan 2023 07:06:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E91DAE092F; Thu, 12 Jan 2023 07:06:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D1D43E092F for ; Thu, 12 Jan 2023 07:06:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D73EC335DC6 for ; Thu, 12 Jan 2023 07:06:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2D2C582E for ; Thu, 12 Jan 2023 07:06:10 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1673507163.09bc4ca6d782ab834481b31f8a22345416c9302a.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: x11-wm/qtile/ X-VCS-Repository: repo/gentoo X-VCS-Files: x11-wm/qtile/qtile-0.22.1-r1.ebuild x11-wm/qtile/qtile-9999.ebuild X-VCS-Directories: x11-wm/qtile/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 09bc4ca6d782ab834481b31f8a22345416c9302a X-VCS-Branch: master Date: Thu, 12 Jan 2023 07:06:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a38c3882-5a6a-4eb4-b6d0-e280ef7305b1 X-Archives-Hash: c0981b96c0aa3a79b31f15bf2733fa3b commit: 09bc4ca6d782ab834481b31f8a22345416c9302a Author: Sam James gentoo org> AuthorDate: Thu Jan 12 07:00:32 2023 +0000 Commit: Sam James gentoo org> CommitDate: Thu Jan 12 07:06:03 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09bc4ca6 x11-wm/qtile: add Wayland support Closes: https://bugs.gentoo.org/846380 Signed-off-by: Sam James gentoo.org> .../{qtile-9999.ebuild => qtile-0.22.1-r1.ebuild} | 45 +++++++++++++++++----- x11-wm/qtile/qtile-9999.ebuild | 42 +++++++++++++++----- 2 files changed, 67 insertions(+), 20 deletions(-) diff --git a/x11-wm/qtile/qtile-9999.ebuild b/x11-wm/qtile/qtile-0.22.1-r1.ebuild similarity index 62% copy from x11-wm/qtile/qtile-9999.ebuild copy to x11-wm/qtile/qtile-0.22.1-r1.ebuild index 11d0d1fd538d..aa215b329fef 100644 --- a/x11-wm/qtile/qtile-9999.ebuild +++ b/x11-wm/qtile/qtile-0.22.1-r1.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{9..11} ) inherit distutils-r1 virtualx @@ -16,29 +16,37 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/qtile/qtile.git" else SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - KEYWORDS="~amd64 ~riscv ~x86" + KEYWORDS="~amd64" fi LICENSE="MIT" SLOT="0" +IUSE="pulseaudio wayland" -RDEPEND=">=dev-python/cairocffi-0.9.0[${PYTHON_USEDEP}] +RDEPEND=" + >=dev-python/cairocffi-0.9.0[${PYTHON_USEDEP}] >=dev-python/cffi-1.1.0[${PYTHON_USEDEP}] dev-python/dbus-next[${PYTHON_USEDEP}] dev-python/pygobject[${PYTHON_USEDEP}] - dev-python/setuptools[${PYTHON_USEDEP}] - dev-python/setuptools_scm[${PYTHON_USEDEP}] >=dev-python/six-1.4.1[${PYTHON_USEDEP}] >=dev-python/xcffib-0.10.1[${PYTHON_USEDEP}] - media-sound/pulseaudio x11-libs/cairo[X,xcb(+)] x11-libs/libnotify[introspection] - x11-libs/pango" + x11-libs/pango + pulseaudio? ( + media-sound/pulseaudio + ) + wayland? ( + dev-python/pywlroots[${PYTHON_USEDEP}] + ) +" BDEPEND=" + dev-python/setuptools_scm[${PYTHON_USEDEP}] test? ( media-gfx/imagemagick[X] x11-base/xorg-server[xephyr] - )" + ) +" EPYTEST_DESELECT=( # Can't find built qtile like migrate @@ -53,6 +61,23 @@ EPYTEST_IGNORE=( distutils_enable_tests pytest +python_prepare_all() { + # Avoid automagic dependency on libpulse + if ! use pulseaudio ; then + sed -i -e "s/call('libpulse', '--libs')/raise PkgConfigError/" setup.py || die + + # TODO: use this sed for next release after 0.22.1, quoting changed + # sed -i -e 's/call("libpulse", "--libs")/throw PkgConfigError/' setup.py || die + fi + + # Avoid automagic dependency on pywlroots + if ! use wayland ; then + sed -i -e 's/import wlroots.ffi_build/raise ImportError/' setup.py || die + fi + + distutils-r1_python_prepare_all +} + src_test() { virtx distutils-r1_src_test } @@ -61,7 +86,7 @@ python_test() { # Force usage of built module rm -rf "${S}"/libqtile || die - epytest || die "Tests failed with ${EPYTHON}" + epytest --backend=x11 $(usev wayland '--backend=wayland') || die "Tests failed with ${EPYTHON}" } python_install_all() { diff --git a/x11-wm/qtile/qtile-9999.ebuild b/x11-wm/qtile/qtile-9999.ebuild index 11d0d1fd538d..9c06ef2a1275 100644 --- a/x11-wm/qtile/qtile-9999.ebuild +++ b/x11-wm/qtile/qtile-9999.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{9..11} ) inherit distutils-r1 virtualx @@ -16,29 +16,37 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/qtile/qtile.git" else SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - KEYWORDS="~amd64 ~riscv ~x86" + KEYWORDS="~amd64" fi LICENSE="MIT" SLOT="0" +IUSE="pulseaudio wayland" -RDEPEND=">=dev-python/cairocffi-0.9.0[${PYTHON_USEDEP}] +RDEPEND=" + >=dev-python/cairocffi-0.9.0[${PYTHON_USEDEP}] >=dev-python/cffi-1.1.0[${PYTHON_USEDEP}] dev-python/dbus-next[${PYTHON_USEDEP}] dev-python/pygobject[${PYTHON_USEDEP}] - dev-python/setuptools[${PYTHON_USEDEP}] - dev-python/setuptools_scm[${PYTHON_USEDEP}] >=dev-python/six-1.4.1[${PYTHON_USEDEP}] >=dev-python/xcffib-0.10.1[${PYTHON_USEDEP}] - media-sound/pulseaudio x11-libs/cairo[X,xcb(+)] x11-libs/libnotify[introspection] - x11-libs/pango" + x11-libs/pango + pulseaudio? ( + media-sound/pulseaudio + ) + wayland? ( + dev-python/pywlroots[${PYTHON_USEDEP}] + ) +" BDEPEND=" + dev-python/setuptools_scm[${PYTHON_USEDEP}] test? ( media-gfx/imagemagick[X] x11-base/xorg-server[xephyr] - )" + ) +" EPYTEST_DESELECT=( # Can't find built qtile like migrate @@ -53,6 +61,20 @@ EPYTEST_IGNORE=( distutils_enable_tests pytest +python_prepare_all() { + # Avoid automagic dependency on libpulse + if ! use pulseaudio ; then + sed -i -e 's/call("libpulse", "--libs")/throw PkgConfigError/' setup.py || die + fi + + # Avoid automagic dependency on pywlroots + if ! use wayland ; then + sed -i -e 's/import wlroots.ffi_build/raise ImportError/' setup.py || die + fi + + distutils-r1_python_prepare_all +} + src_test() { virtx distutils-r1_src_test } @@ -61,7 +83,7 @@ python_test() { # Force usage of built module rm -rf "${S}"/libqtile || die - epytest || die "Tests failed with ${EPYTHON}" + epytest --backend=x11 $(usev wayland '--backend=wayland') || die "Tests failed with ${EPYTHON}" } python_install_all() {