*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / python-iptables / python-iptables-0.13.0.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,7} )
6 inherit distutils-r1
7
8 DESCRIPTION="Python bindings for iptables"
9 HOMEPAGE="https://github.com/ldx/python-iptables"
10 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
11
12 LICENSE="Apache-2.0"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="doc"
16
17 RDEPEND="net-firewall/iptables"
18 DEPEND="${RDEPEND}
19         dev-python/setuptools[${PYTHON_USEDEP}]
20         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
21
22 # tests manipulate live iptables rules, so disable them by default
23
24 python_prepare_all() {
25         # Prevent un-needed d'loading during doc build
26         sed -e "s/, 'sphinx.ext.intersphinx'//" -i doc/conf.py || die
27         distutils-r1_python_prepare_all
28 }
29
30 python_compile_all() {
31         use doc && emake -C doc html
32 }
33
34 python_install_all() {
35         use doc && local HTML_DOCS=( doc/_build/html/. )
36         distutils-r1_python_install_all
37 }