summaryrefslogtreecommitdiff
path: root/dev-python/polygon
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/polygon')
-rw-r--r--dev-python/polygon/Manifest1
-rw-r--r--dev-python/polygon/polygon-3.0.9.ebuild48
2 files changed, 49 insertions, 0 deletions
diff --git a/dev-python/polygon/Manifest b/dev-python/polygon/Manifest
index 59f8efa98cc7..7f1bd9af2495 100644
--- a/dev-python/polygon/Manifest
+++ b/dev-python/polygon/Manifest
@@ -1 +1,2 @@
DIST Polygon3-3.0.7.zip 76193 BLAKE2B 57ef62b6652400be057e8596f705e2112caef09208aafa7e46686f86367181dc078cbfc6ade99af22cce7fc0a76ec1de2995885ba4c11263444ca315029c38d7 SHA512 e30cd8e51ad69a2d76b61a7d92ead4ac352e729093546b965f649866fd9c6a860e3cdcd9fcd7f8cc9f8d7735ccd1128fb5af00b3de89e4efd7128e446a70b33b
+DIST polygon-3.0.9.gh.tar.gz 76241 BLAKE2B cb670e595403a4a927c78bcba61fc7f28eaaae3dc16a36b105fda880f25134e187886579f7e986653f05fe3f6f2d552ac5b23c8be8ba61bcc0ce0fb733692882 SHA512 d6ce104df45666f5321cd3ef1582853b47b681a19238eb9772b7688333815ac4f5d9a5ab0aadc56301c10019e196efc6e6062e856f6ef8872d992ecd406f3b87
diff --git a/dev-python/polygon/polygon-3.0.9.ebuild b/dev-python/polygon/polygon-3.0.9.ebuild
new file mode 100644
index 000000000000..d8f82b9c60bf
--- /dev/null
+++ b/dev-python/polygon/polygon-3.0.9.ebuild
@@ -0,0 +1,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_{6,7,8,9,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
+}