sys-apps/osinfo-db-tools: properly use python-any-r1 for the new test deps
authorMart Raudsepp <leio@gentoo.org>
Sun, 23 Feb 2020 19:29:45 +0000 (21:29 +0200)
committerMart Raudsepp <leio@gentoo.org>
Sun, 23 Feb 2020 19:31:47 +0000 (21:31 +0200)
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
sys-apps/osinfo-db-tools/osinfo-db-tools-1.6.0-r1.ebuild [moved from sys-apps/osinfo-db-tools/osinfo-db-tools-1.6.0.ebuild with 74% similarity]

similarity index 74%
rename from sys-apps/osinfo-db-tools/osinfo-db-tools-1.6.0.ebuild
rename to sys-apps/osinfo-db-tools/osinfo-db-tools-1.6.0-r1.ebuild
index e3002f6cee0346b9a865093f711ea046b5c7c94e..1d3a019cc34285ff44d260c636f50f7faf0f5d48 100644 (file)
@@ -5,7 +5,7 @@ EAPI=6
 
 PYTHON_COMPAT=( python3_{6,7,8} )
 
-inherit python-single-r1 gnome2
+inherit python-any-r1 gnome2
 
 DESCRIPTION="Tools for managing the osinfo database"
 HOMEPAGE="https://libosinfo.org/"
@@ -16,7 +16,6 @@ SLOT="0"
 
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
 IUSE="test"
-REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )"
 RESTRICT="!test? ( test )"
 
 # Blocker on old libosinfo as osinfo-db-validate was part of it before
@@ -35,14 +34,20 @@ DEPEND="${RDEPEND}
        virtual/pkgconfig
        >=sys-devel/gettext-0.19.8
        dev-lang/perl
-       test? ( ${PYTHON_DEPS}
-               $(python_gen_cond_dep '
-                       dev-python/pytest[${PYTHON_MULTI_USEDEP}]
-                       dev-python/requests[${PYTHON_MULTI_USEDEP}]
+       test? (
+               $(python_gen_any_dep '
+                       dev-python/pytest[${PYTHON_USEDEP}]
+                       dev-python/requests[${PYTHON_USEDEP}]
                ')
        )
 "
 
+python_check_deps() {
+       use test && \
+               has_version "dev-python/pytest[${PYTHON_USEDEP}]" && \
+               has_version "dev-python/requests[${PYTHON_USEDEP}]"
+}
+
 pkg_setup() {
-       use test && python-single-r1_pkg_setup
+       use test && python-any-r1_pkg_setup
 }