1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python3_{6,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"
14 KEYWORDS="~amd64 ~x86"
17 RDEPEND="net-firewall/iptables"
19 dev-python/setuptools[${PYTHON_USEDEP}]
20 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
22 # tests manipulate live iptables rules, so disable them by default
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
30 python_compile_all() {
31 use doc && emake -C doc html
34 python_install_all() {
35 use doc && local HTML_DOCS=( doc/_build/html/. )
36 distutils-r1_python_install_all