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 <marecki@gentoo.org>
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"
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] )"
"${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