*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / polygon / polygon-3.0.7.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 PYTHON_COMPAT=( python3_6 )
6
7 inherit distutils-r1
8
9 DESCRIPTION="Python package to handle polygonal shapes in 2D"
10 HOMEPAGE="https://www.j-raedler.de/projects/polygon/"
11 SRC_URI="https://www.bitbucket.org/jraedler/${PN}3/downloads/Polygon3-${PV}.zip"
12
13 LICENSE="LGPL-2"
14 SLOT="3"
15 IUSE="examples"
16 KEYWORDS="amd64 ppc x86"
17
18 DEPEND="app-arch/unzip"
19
20 S=${WORKDIR}/Polygon3-${PV}
21
22 DOCS=( doc/{Polygon.txt,Polygon.pdf} )
23
24 python_prepare_all() {
25         if use examples; then
26                 mkdir examples || die
27                 mv doc/{Examples.py,testpoly.gpf} examples || die
28         fi
29         distutils-r1_python_prepare_all
30 }
31
32 python_test() {
33         ${PYTHON} test/Test.py || die "Tests failed under ${EPYTHON}"
34 }
35
36 python_install_all() {
37         use examples && local EXAMPLES=( examples/. )
38         distutils-r1_python_install_all
39 }