2015-04-26 22:54:50 +03:00
|
|
|
# Copyright 1999-2015 Gentoo Foundation
|
2014-05-16 11:07:59 +04:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=5
|
2016-11-02 01:52:32 +03:00
|
|
|
PYTHON_COMPAT=( python3_4 )
|
2014-05-16 11:07:59 +04:00
|
|
|
|
|
|
|
inherit distutils-r1
|
|
|
|
|
|
|
|
MY_PN="${PN/py/py3}"
|
|
|
|
MY_P="${MY_PN}-${PV}"
|
|
|
|
DESCRIPTION="Python DNS (Domain Name System) library"
|
|
|
|
HOMEPAGE="https://launchpad.net/py3dns"
|
|
|
|
SRC_URI="https://launchpad.net/${MY_PN}/trunk/${PV}/+download/${MY_P}.tar.gz"
|
|
|
|
|
|
|
|
LICENSE="CNRI"
|
|
|
|
SLOT="3"
|
2015-07-18 22:34:49 +03:00
|
|
|
KEYWORDS="amd64 hppa ~ia64 ~ppc ~sparc x86"
|
2014-05-16 11:07:59 +04:00
|
|
|
IUSE="examples"
|
|
|
|
|
|
|
|
DEPEND=""
|
|
|
|
RDEPEND=""
|
|
|
|
|
|
|
|
# Most if not all of the tests require network access.
|
|
|
|
RESTRICT=test
|
|
|
|
|
|
|
|
S="${WORKDIR}/${MY_P}"
|
|
|
|
|
|
|
|
python_test() {
|
|
|
|
# Some of the tests are broken.
|
|
|
|
for test in tests/{test{,2,4}.py,testsrv.py}
|
|
|
|
do
|
|
|
|
"${PYTHON}" ${test} || die
|
|
|
|
done
|
|
|
|
|
|
|
|
"${PYTHON}" tests/test5.py example.org || die
|
|
|
|
}
|
|
|
|
|
|
|
|
python_install_all() {
|
|
|
|
use examples && local EXAMPLES=( ./{tests,tools}/. )
|
|
|
|
distutils-r1_python_install_all
|
|
|
|
}
|