12825543a2e2e99c3e4efefd8223495552fd16d9
[gentoo.git] / dev-python / geoip-python / geoip-python-1.3.2-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} pypy pypy3 )
6
7 inherit distutils-r1
8
9 MY_PN="geoip-api-python"
10 MY_P="${MY_PN}-${PV}"
11
12 DESCRIPTION="Python bindings for GeoIP"
13 HOMEPAGE="https://github.com/maxmind/geoip-api-python"
14 SRC_URI="https://github.com/maxmind/${MY_PN}/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
15
16 LICENSE="GPL-2+"
17 SLOT="0"
18 KEYWORDS="amd64 ~ia64 ~ppc ~sparc x86"
19 IUSE="examples test"
20 RESTRICT="!test? ( test )"
21
22 RDEPEND=">=dev-libs/geoip-1.4.8"
23 DEPEND="
24         ${RDEPEND}
25         dev-python/setuptools[${PYTHON_USEDEP}]
26         test? ( dev-python/nose[${PYTHON_USEDEP}] )
27 "
28
29 S="${WORKDIR}/${MY_P}"
30
31 DOCS=( README.rst ChangeLog.md )
32
33 python_test() {
34         esetup.py test
35 }
36
37 python_install_all() {
38         if use examples; then
39                 dodoc -r examples
40                 docompress -x /usr/share/doc/${PF}/examples
41         fi
42         distutils-r1_python_install_all
43 }