From ca4c364d488038ea227344a67b8303e6f9e1810a Mon Sep 17 00:00:00 2001 From: Henri Gasc Date: Mon, 6 Feb 2023 11:12:43 +0100 Subject: [PATCH 1/6] dev-python/svgelements: Use optfeature instead of doing it by hand Signed-off-by: Henri Gasc --- dev-python/svgelements/svgelements-1.9.0.ebuild | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dev-python/svgelements/svgelements-1.9.0.ebuild b/dev-python/svgelements/svgelements-1.9.0.ebuild index a249fc5f68..dbf0091254 100644 --- a/dev-python/svgelements/svgelements-1.9.0.ebuild +++ b/dev-python/svgelements/svgelements-1.9.0.ebuild @@ -6,7 +6,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{9..11} ) -inherit distutils-r1 +inherit distutils-r1 optfeature DESCRIPTION="SVG Parsing for Elements, Paths, and other SVG Objects." HOMEPAGE="https://github.com/meerk40t/svgelements https://pypi.org/project/svgelements" @@ -40,9 +40,7 @@ python_test() { } pkg_postinst() { - elog Some other packages could be installed to extend functionnality: - elog - elog - dev-python/scipy, to be more precise for arc lenght - elog - dev-python/pillow, to be able to load images - elog - dev-python/numpy, to do lightning fast linearization for Shapes + optfeature "getting exact value for arc lenght computation" dev-python/scipy + optfeature "loading images" dev-python/pillow + optfeature "speeding up linearization for Shapes" dev-python/numpy } From ad9d25aaf86c7316f784c52b449d84eb968cc9ee Mon Sep 17 00:00:00 2001 From: Henri Gasc Date: Mon, 6 Feb 2023 13:26:41 +0100 Subject: [PATCH 2/6] dev-python/glcontext: Allow test Signed-off-by: Henri Gasc --- dev-python/glcontext/glcontext-2.3.7.ebuild | 24 ++++++++------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/dev-python/glcontext/glcontext-2.3.7.ebuild b/dev-python/glcontext/glcontext-2.3.7.ebuild index 6c7170a430..cc9401ad12 100644 --- a/dev-python/glcontext/glcontext-2.3.7.ebuild +++ b/dev-python/glcontext/glcontext-2.3.7.ebuild @@ -6,7 +6,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{10..11} ) -inherit distutils-r1 +inherit distutils-r1 virtualx DESCRIPTION="Modern OpenGL binding for python" HOMEPAGE="https://github.com/moderngl/glcontext https://pypi.org/project/glcontext" @@ -31,18 +31,12 @@ BDEPEND=" " DEPEND="${BDEPEND}" -# Tests are deactivated because we cannot open display -# distutils_enable_tests pytest -# src_test() { -# virtx distutils-r1_src_test -# } - -# python_test() { -# cd "${T}" || die -# epytest "${S}"/tests || die "Tests failed with ${EPYTHON}" -# } - -pkg_postinst() { - use test && ewarn The tests for this package are deactivated because the test display can not be opened. - use test && ewarn If you know how to solve this issue, please do so. +distutils_enable_tests pytest +src_test() { + virtx distutils-r1_src_test +} + +python_test() { + cd "${T}" || die + epytest "${S}"/tests || die "Tests failed with ${EPYTHON}" } From 20fa7fcdad76c92f541b3d9e965450185f4dca87 Mon Sep 17 00:00:00 2001 From: Henri Gasc Date: Mon, 6 Feb 2023 14:30:21 +0100 Subject: [PATCH 3/6] dev-python/moderngl: Enable tests Closes: https://bugs.gentoo.org/893394 Signed-off-by: Henri Gasc --- dev-python/moderngl/moderngl-5.7.4.ebuild | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/dev-python/moderngl/moderngl-5.7.4.ebuild b/dev-python/moderngl/moderngl-5.7.4.ebuild index 86e2801043..64bd4a98e1 100644 --- a/dev-python/moderngl/moderngl-5.7.4.ebuild +++ b/dev-python/moderngl/moderngl-5.7.4.ebuild @@ -6,7 +6,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{10..11} ) -inherit distutils-r1 +inherit distutils-r1 virtualx DESCRIPTION="Modern OpenGL binding for python" HOMEPAGE="https://github.com/moderngl/moderngl https://pypi.org/project/moderngl" @@ -34,14 +34,13 @@ BDEPEND=" " DEPEND="${BDEPEND}" -# Tests are deactivated because we cannot open display -# distutils_enable_tests pytest -# python_test() { -# cd "${T}" || die -# epytest "${S}"/tests -# } +distutils_enable_tests pytest -pkg_postinst() { - use test && ewarn The tests for this package are deactivated because the test display can not be opened. - use test && ewarn If you know how to solve this issue, please do so. +src_test() { + virtx distutils-r1_src_test +} +python_test() { + rm "${S}/tests/test_local.py" + cd "${T}" || die + epytest "${S}"/tests } From 284c01bc02a6492e2571dd1953b352ee71ba088d Mon Sep 17 00:00:00 2001 From: Henri Gasc Date: Mon, 6 Feb 2023 17:41:11 +0100 Subject: [PATCH 4/6] dev-python/pyrr: new package, add 0.10.3 Signed-off-by: Henri Gasc --- dev-python/pyrr/Manifest | 1 + dev-python/pyrr/metadata.xml | 12 ++++++++ dev-python/pyrr/pyrr-0.10.3.ebuild | 46 ++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 dev-python/pyrr/Manifest create mode 100644 dev-python/pyrr/metadata.xml create mode 100644 dev-python/pyrr/pyrr-0.10.3.ebuild diff --git a/dev-python/pyrr/Manifest b/dev-python/pyrr/Manifest new file mode 100644 index 0000000000..383fae89a4 --- /dev/null +++ b/dev-python/pyrr/Manifest @@ -0,0 +1 @@ +DIST v0.10.3.gh.tar.gz 66011 BLAKE2B 843cb7199daae203e93567ad90a8f4456d9e940830d8a88bbe3b316900ccd38df996016b40435b55e857364312c5bca55d078f416a24f9badbe9867039fbe662 SHA512 f3f045604e28f4a944ea0528363c233a75413a6039bd11b90eeeafadcaaf0ef44bc1303581f2e78adcfb9a365f719be64a24adf1cec8c5ef1abf5642dea58df4 diff --git a/dev-python/pyrr/metadata.xml b/dev-python/pyrr/metadata.xml new file mode 100644 index 0000000000..16493659ec --- /dev/null +++ b/dev-python/pyrr/metadata.xml @@ -0,0 +1,12 @@ + + + + + gasc@eurecom.fr + Gasc Henri + + + pyrr + adamlwgriffiths/pyrr + + diff --git a/dev-python/pyrr/pyrr-0.10.3.ebuild b/dev-python/pyrr/pyrr-0.10.3.ebuild new file mode 100644 index 0000000000..574118c512 --- /dev/null +++ b/dev-python/pyrr/pyrr-0.10.3.ebuild @@ -0,0 +1,46 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..11} ) + +inherit distutils-r1 + +DESCRIPTION="A cross platform utility library for ModernGL" +HOMEPAGE="https://github.com/adamlwgriffiths/pyrr https://pypi.org/project/pyrr" +SRC_URI="https://github.com/adamlwgriffiths/pyrr/archive/refs/tags/${PV}.tar.gz -> v${PV}.gh.tar.gz" +S="${WORKDIR}/Pyrr-${PV}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND="" +BDEPEND=" + dev-python/multipledispatch[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/wheel[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] +" +DEPEND="${BDEPEND}" + +python_compile() { + distutils-r1_python_compile + find ./ -type f -exec sed -i 's/sphinx.ext.pngmath/sphinx.ext.imgmath/g' {} \; + emake man -C docs +} + +python_install() { + distutils-r1_python_install + doman "${S}/docs/build/man/pyrr.1" +} + +# The tests failed with `module 'numpy' has no attribute 'float'` +# distutils_enable_tests pytest +# python_test() { +# cd "${T}" || die +# epytest "${S}"/tests || die "Tests failed with ${EPYTHON}" +# } From 4dfd0b969d03f4af5fa7956a0f9e1cc8e4a0068a Mon Sep 17 00:00:00 2001 From: Henri Gasc Date: Mon, 6 Feb 2023 19:19:30 +0100 Subject: [PATCH 5/6] dev-python/PyWavefront: new package, add 1.3.3 Signed-off-by: Henri Gasc --- dev-python/PyWavefront/Manifest | 1 + .../PyWavefront/PyWavefront-1.3.3.ebuild | 41 +++++++++++++++++++ dev-python/PyWavefront/metadata.xml | 12 ++++++ 3 files changed, 54 insertions(+) create mode 100644 dev-python/PyWavefront/Manifest create mode 100644 dev-python/PyWavefront/PyWavefront-1.3.3.ebuild create mode 100644 dev-python/PyWavefront/metadata.xml diff --git a/dev-python/PyWavefront/Manifest b/dev-python/PyWavefront/Manifest new file mode 100644 index 0000000000..ceec33cedf --- /dev/null +++ b/dev-python/PyWavefront/Manifest @@ -0,0 +1 @@ +DIST v1.3.3.gh.tar.gz 3531475 BLAKE2B 4c6493ce5df9767a4ae69ff70c9ac18fcefc8039498c90d66aa493657cb190a58b6e7ab24cb469be1e0d16098c4e4b29a397a003281bcc742cc9d4d711db8c8c SHA512 9d78282dc626bbb9f20c45d4a0a1911e8dd1f11c3e8c50e3637ed33e976c253e4dd9c5faee29bbad5edf241877b2df4d25f77fd3bcc6dd438b7e46c8d821918d diff --git a/dev-python/PyWavefront/PyWavefront-1.3.3.ebuild b/dev-python/PyWavefront/PyWavefront-1.3.3.ebuild new file mode 100644 index 0000000000..ccbe0ef687 --- /dev/null +++ b/dev-python/PyWavefront/PyWavefront-1.3.3.ebuild @@ -0,0 +1,41 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..11} ) + +inherit distutils-r1 + +DESCRIPTION="Python library for importing Wavefront .obj files" +HOMEPAGE="https://github.com/pywavefront/PyWavefront https://pypi.org/project/PyWavefront" +SRC_URI="https://github.com/pywavefront/PyWavefront/archive/refs/tags/${PV}.tar.gz -> v${PV}.gh.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND="" +BDEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/wheel[${PYTHON_USEDEP}] + test? ( + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + ) +" +DEPEND="${BDEPEND}" + +distutils_enable_tests pytest + +# src_test() { +# virtx distutils-r1_src_test +# } +# python_test() { +# rm "${S}/tests/test_local.py" +# cd "${T}" || die +# epytest "${S}"/tests +# } diff --git a/dev-python/PyWavefront/metadata.xml b/dev-python/PyWavefront/metadata.xml new file mode 100644 index 0000000000..90a5c1476e --- /dev/null +++ b/dev-python/PyWavefront/metadata.xml @@ -0,0 +1,12 @@ + + + + + gasc@eurecom.fr + Gasc Henri + + + PyWavefront + pywavefront/PyWavefront + + From 871ba81c1122a62f1c9c8e2f6900c5b41edafd4f Mon Sep 17 00:00:00 2001 From: Henri Gasc Date: Mon, 6 Feb 2023 19:33:12 +0100 Subject: [PATCH 6/6] dev-python/moderngl-window: disable py3.11, allow tests Closes: https://bugs.gentoo.org/893396 Signed-off-by: Henri Gasc --- .../moderngl-window-2.4.2.ebuild | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/dev-python/moderngl-window/moderngl-window-2.4.2.ebuild b/dev-python/moderngl-window/moderngl-window-2.4.2.ebuild index 137c958718..48ec041298 100644 --- a/dev-python/moderngl-window/moderngl-window-2.4.2.ebuild +++ b/dev-python/moderngl-window/moderngl-window-2.4.2.ebuild @@ -4,9 +4,9 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..11} ) +PYTHON_COMPAT=( python3_10 ) -inherit distutils-r1 +inherit distutils-r1 virtualx DESCRIPTION="A cross platform utility library for ModernGL" HOMEPAGE="https://github.com/moderngl/moderngl-window https://pypi.org/project/moderngl-window" @@ -15,11 +15,26 @@ SRC_URI="https://github.com/moderngl/moderngl-window/archive/refs/tags/${PV}.tar LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" +IUSE="test" RDEPEND="" BDEPEND=" dev-python/setuptools[${PYTHON_USEDEP}] dev-python/wheel[${PYTHON_USEDEP}] + test? ( + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/tox[${PYTHON_USEDEP}] + dev-python/flake8[${PYTHON_USEDEP}] + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/moderngl[${PYTHON_USEDEP}] + dev-python/glcontext[${PYTHON_USEDEP}] + dev-python/trimesh[${PYTHON_USEDEP}] + dev-python/PyWavefront[${PYTHON_USEDEP}] + ) " DEPEND="${BDEPEND}" + +distutils_enable_tests pytest +src_test() { + virtx distutils-r1_src_test +}