*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / pydns / pydns-3.1.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python3_6 pypy3 )
6
7 inherit distutils-r1
8
9 MY_PN="${PN/py/py3}"
10 MY_P="${MY_PN}-${PV}"
11 DESCRIPTION="Python DNS (Domain Name System) library"
12 HOMEPAGE="https://launchpad.net/py3dns"
13 SRC_URI="https://launchpad.net/${MY_PN}/trunk/${PV}/+download/${MY_P}.tar.gz"
14
15 LICENSE="CNRI"
16 SLOT="3"
17 KEYWORDS="amd64 hppa ~ia64 ~ppc ~sparc x86"
18 IUSE="examples"
19
20 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
21
22 # Tests require network access
23 RESTRICT="test"
24
25 S="${WORKDIR}/${MY_P}"
26
27 python_test() {
28         "${EPYTHON}" -m unittest || die "tests failed with ${EPYTHON}"
29 }
30
31 python_install_all() {
32         if use examples; then
33                 docinto examples
34                 dodoc -r tests/. tools/.
35                 docompress -x /usr/share/doc/${PF}/examples
36         fi
37         distutils-r1_python_install_all
38 }