blob: 94322a9bfbcfd1b0fa3fe332f57db372deb64c22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
# this version is untagged in github, and pypi doesn't has tests
COMMIT=7b2091f77741fa1d94251979bc4a4f2676b4d2d1
DESCRIPTION="Python package to handle polygonal shapes in 2D"
HOMEPAGE="https://www.j-raedler.de/projects/polygon/
https://github.com/jraedler/Polygon3"
SRC_URI="
https://github.com/jraedler/Polygon3/archive/${COMMIT}.tar.gz
-> ${P}.gh.tar.gz"
S="${WORKDIR}/Polygon3-${COMMIT}"
LICENSE="LGPL-2"
SLOT="3"
KEYWORDS="amd64 ppc x86"
IUSE="examples"
DOCS=( doc/{Polygon.txt,Polygon.pdf} )
src_prepare() {
if use examples; then
mkdir examples || die
mv doc/{Examples.py,testpoly.gpf} examples || die
fi
distutils-r1_src_prepare
}
python_test() {
"${EPYTHON}" test/Test.py -v || die "Tests failed under ${EPYTHON}"
}
src_install() {
if use examples; then
dodoc -r examples
docompress -x /usr/share/doc/${PF}/examples
fi
distutils-r1_src_install
}
|