From f301c1af86e4f38f3e8fe674ef253adfb5aed4e7 Mon Sep 17 00:00:00 2001 From: Marek Szuba Date: Thu, 23 Apr 2020 00:27:43 +0100 Subject: [PATCH] dev-libs/libjcat: add explicit build-time dependency on Python libjcat build scripts run an external Python script to generate a map file for the library. In the current version of libjcat Meson invokes that script using the same Python as itself (it depends on the same Python packages as said script), however upstream has recently changed this to an explicit request for an implementation providing XML support and setuptools - and when I tried the very same approach in the course of investigating Bug #715670, without an explicit dependency it would abort configuration unless the necessary modules were provided by the default python3. Besides, implicitly depending on modules used by Meson itself goes against the whole "I am written in Python but you are not supposed to pay any attention to it" thing. Signed-off-by: Marek Szuba --- dev-libs/libjcat/libjcat-0.1.1.ebuild | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dev-libs/libjcat/libjcat-0.1.1.ebuild b/dev-libs/libjcat/libjcat-0.1.1.ebuild index 8a87c2a8b19c..06f0e8d33d08 100644 --- a/dev-libs/libjcat/libjcat-0.1.1.ebuild +++ b/dev-libs/libjcat/libjcat-0.1.1.ebuild @@ -3,7 +3,10 @@ EAPI=7 -inherit meson vala xdg-utils +PYTHON_COMPAT=( python3_{6,7,8} ) +PYTHON_REQ_USE="xml" + +inherit meson python-any-r1 vala xdg-utils DESCRIPTION="Library and tool for reading and writing Jcat files " HOMEPAGE="https://github.com/hughsie/libjcat" @@ -25,6 +28,9 @@ RDEPEND="dev-libs/glib:2 dev-lang/vala:=" DEPEND="${RDEPEND}" BDEPEND="virtual/pkgconfig + $(python_gen_any_dep ' + dev-python/setuptools[${PYTHON_USEDEP}] + ') gtk-doc? ( dev-util/gtk-doc ) man? ( sys-apps/help2man ) test? ( net-libs/gnutls[tools] )" @@ -35,6 +41,10 @@ PATCHES=( "${FILESDIR}"/${PN}-0.1.1-disable_installed_tests.patch ) +python_check_deps() { + has_version -b "dev-python/setuptools[${PYTHON_USEDEP}]" +} + src_prepare() { xdg_environment_reset # TODO: make vala optional -- 2.26.2