*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / clang-python / clang-python-9.0.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{6,7} )
7 inherit llvm.org python-r1
8
9 DESCRIPTION="Python bindings for sys-devel/clang"
10 HOMEPAGE="https://llvm.org/"
11 LLVM_COMPONENTS=( clang/bindings/python )
12 llvm.org_set_globals
13
14 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
15 SLOT="0"
16 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
17 IUSE="test"
18 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
19 RESTRICT="!test? ( test )"
20
21 # The module is opening libclang.so directly, and doing some blasphemy
22 # on top of it.
23 RDEPEND="
24         >=sys-devel/clang-${PV}:*
25         !sys-devel/llvm:0[clang(-),python(-)]
26         !sys-devel/clang:0[python(-)]
27         ${PYTHON_DEPS}"
28 DEPEND="${RDEPEND}"
29
30 python_test() {
31         "${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
32 }
33
34 src_test() {
35         python_foreach_impl python_test
36 }
37
38 src_install() {
39         python_foreach_impl python_domodule clang
40 }