commit:     399443e37b2990cd86f0a5220b300a0f1f502337
Author:     BratishkaErik <bratishkaerik <AT> getgoogleoff <DOT> me>
AuthorDate: Fri Mar 11 10:30:26 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Mar 11 14:37:20 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=399443e3

app-misc/piper: make flake8 optional dependency

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Closes: https://github.com/gentoo/gentoo/pull/24414
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-misc/piper/piper-0.6.ebuild | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/app-misc/piper/piper-0.6.ebuild b/app-misc/piper/piper-0.6.ebuild
index 4069145b9c5c..bc683c50c698 100644
--- a/app-misc/piper/piper-0.6.ebuild
+++ b/app-misc/piper/piper-0.6.ebuild
@@ -14,11 +14,18 @@ 
SRC_URI="https://github.com/libratbag/piper/archive/${PV}.tar.gz -> ${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64"
+IUSE="test"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
 
 BDEPEND="
        ${PYTHON_DEPS}
        virtual/pkgconfig
+       test? (
+               $(python_gen_cond_dep '
+                       dev-python/flake8[${PYTHON_USEDEP}]
+               ')
+       )
 "
 RDEPEND="
        ${PYTHON_DEPS}
@@ -32,7 +39,6 @@ RDEPEND="
                dev-python/pycairo[${PYTHON_USEDEP}]
                dev-python/pygobject:3[cairo,${PYTHON_USEDEP}]
                dev-python/python-evdev[${PYTHON_USEDEP}]
-               dev-python/flake8[${PYTHON_USEDEP}]
        ')
 "
 DEPEND="
@@ -43,6 +49,11 @@ DEPEND="
 
 src_configure() {
        python_setup
+
+       local emesonargs=(
+               $(meson_use test tests)
+       )
+
        meson_src_configure
 }
 

Reply via email to