dev-perl/Class-Inspector: amd64 stable
[gentoo.git] / dev-python / ipy / ipy-0.83.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
7
8 inherit distutils-r1
9
10 MY_PN="IPy"
11 MY_P="${MY_PN}-${PV}"
12
13 DESCRIPTION="Class and tools for handling of IPv4 and IPv6 addresses and networks"
14 HOMEPAGE="https://github.com/haypo/python-ipy/wiki https://pypi.python.org/pypi/IPy"
15 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
16
17 LICENSE="BSD"
18 SLOT="0"
19 KEYWORDS="amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc x86"
20 IUSE="examples"
21
22 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
23 RDEPEND=""
24
25 S="${WORKDIR}/${MY_PN}-${PV}"
26
27 python_test() {
28         # 1 test fail under pypy, persistent from 0.82a, not a regression.
29         cp -r test_doc.py README test "${BUILD_DIR}" || die
30         pushd "${BUILD_DIR}" > /dev/null || die
31         "${PYTHON}" test/test_IPy.py || die "Tests fail with ${EPYTHON}"
32         "${PYTHON}" test_doc.py || die "Doctests fail with ${EPYTHON}"
33         popd > /dev/null || die
34 }
35
36 python_install_all() {
37         use examples && local EXAMPLES=( example/. )
38         distutils-r1_python_install_all
39 }