dev-libs/libxmlb: fix Python dependency
authorThomas Deutschmann <whissi@gentoo.org>
Tue, 24 Sep 2019 21:52:28 +0000 (23:52 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Tue, 24 Sep 2019 22:09:46 +0000 (00:09 +0200)
Closes: https://bugs.gentoo.org/692904
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
dev-libs/libxmlb/libxmlb-0.1.11.ebuild

index 487a34f0da43936fa30f8a71dcf99f03f791afb3..51a1b304f84ce8fc36e6cb97bb57ee67d973f658 100644 (file)
@@ -3,7 +3,9 @@
 
 EAPI=7
 
-inherit meson
+PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
+
+inherit meson python-any-r1
 
 DESCRIPTION="Library to help create and query binary XML blobs"
 HOMEPAGE="https://github.com/hughsie/libxmlb"
@@ -29,8 +31,20 @@ DEPEND="
 BDEPEND="
        >=dev-util/meson-0.47.0
        virtual/pkgconfig
+       introspection? (
+               $(python_gen_any_dep 'dev-python/setuptools[${PYTHON_USEDEP}]')
+               ${PYTHON_DEPS}
+       )
 "
 
+python_check_deps() {
+       has_version -b "dev-python/setuptools[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+       use introspection && python-any-r1_pkg_setup
+}
+
 src_configure() {
        local emesonargs=(
                -Dgtkdoc="$(usex doc true false)"