*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / dnspython / dnspython-1.15.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 python3_6 )
7
8 inherit distutils-r1
9
10 DESCRIPTION="DNS toolkit for Python"
11 HOMEPAGE="http://www.dnspython.org/ https://pypi.org/project/dnspython/"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
13
14 LICENSE="ISC"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
17 IUSE="examples test"
18 RESTRICT="!test? ( test )"
19
20 RDEPEND="dev-python/pycrypto[${PYTHON_USEDEP}]
21         !dev-python/dnspython:py2
22         !dev-python/dnspython:py3"
23 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
24         app-arch/unzip"
25
26 # For testsuite
27 DISTUTILS_IN_SOURCE_BUILD=1
28
29 python_test() {
30         cd tests || die
31         "${PYTHON}" utest.py || die "tests failed under ${EPYTHON}"
32         einfo "Testsuite passed under ${EPYTHON}"
33 }
34
35 python_install_all() {
36         distutils-r1_python_install_all
37         if use examples; then
38                 dodoc -r examples
39                 docompress -x /usr/share/doc/${PF}/examples
40         fi
41 }