commit: 31cb07ebadc2954af29259b0246e72bb3e9883a3 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Wed Sep 18 02:42:11 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Sep 18 02:45:34 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31cb07eb
dev-python/pyopengl: add 3.1.8 Bug: https://bugs.gentoo.org/934817 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-python/pyopengl/Manifest | 1 + .../files/pyopengl-3.1.8-fix-version.patch | 17 +++++ dev-python/pyopengl/pyopengl-3.1.8.ebuild | 74 ++++++++++++++++++++++ 3 files changed, 92 insertions(+) diff --git a/dev-python/pyopengl/Manifest b/dev-python/pyopengl/Manifest index 819e62cac925..a5d4d4e20cc4 100644 --- a/dev-python/pyopengl/Manifest +++ b/dev-python/pyopengl/Manifest @@ -1 +1,2 @@ DIST PyOpenGL-3.1.7.tar.gz 1896446 BLAKE2B 3fd4c84bb59157b4a6ee09c2a5ecd0e4f548bf03a84d735acfd92453eafb92102677a2b9c98831a92be33e873630c815dee453745d630a4d6b044771a13c945c SHA512 add1b4d02e7297f00f82a9c9249d6665029073fe620a1650491af9102a76a16e9320b5f227275b0c273ff5a616c284fd9f25f0f425848676c37cab9f3c22ae2e +DIST pyopengl-3.1.8.gh.tar.gz 3599436 BLAKE2B 7f33345d68d66d3cc81278eaa5f54298694f41f40583ee08a1f9f677705fb4414b6b2afbcd7b9345199b5f573478bfeba050e185b6534cbb19b45cb25c241b47 SHA512 d95014a36bd889fa014043e4640ba7f319bb996cb56e5f7086ee05d39c53d3928512d52b0ce181d7c144775a4da7eff7403cada0f91f23f56a699a1b023e00e6 diff --git a/dev-python/pyopengl/files/pyopengl-3.1.8-fix-version.patch b/dev-python/pyopengl/files/pyopengl-3.1.8-fix-version.patch new file mode 100644 index 000000000000..7017dd79a451 --- /dev/null +++ b/dev-python/pyopengl/files/pyopengl-3.1.8-fix-version.patch @@ -0,0 +1,17 @@ +https://github.com/mcfletch/pyopengl/issues/123 +--- a/OpenGL/version.py ++++ b/OpenGL/version.py +@@ -1,2 +1,2 @@ + """Declares the current version for use in setuptools and the like""" +-__version__ = "3.1.7" ++__version__ = "3.1.8" +--- a/accelerate/OpenGL_accelerate/__init__.py ++++ b/accelerate/OpenGL_accelerate/__init__.py +@@ -6,5 +6,5 @@ wrapper mechanism. The source code is part of the + PyOpenGL package and is built via the setupaccel.py + script in the top level of the PyOpenGL source package. + """ +-__version__ = "3.1.7" +-__version_tuple__ = (3, 1, 7) ++__version__ = "3.1.8" ++__version_tuple__ = (3, 1, 8) diff --git a/dev-python/pyopengl/pyopengl-3.1.8.ebuild b/dev-python/pyopengl/pyopengl-3.1.8.ebuild new file mode 100644 index 000000000000..955bd7218309 --- /dev/null +++ b/dev-python/pyopengl/pyopengl-3.1.8.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYPI_NO_NORMALIZE=1 +PYPI_PN=PyOpenGL +PYTHON_REQ_USE="tk?" +PYTHON_COMPAT=( pypy3 python3_{10..13} ) + +inherit distutils-r1 virtualx + +DESCRIPTION="Python OpenGL bindings" +HOMEPAGE=" + https://pyopengl.sourceforge.net/ + https://github.com/mcfletch/pyopengl/ + https://pypi.org/project/PyOpenGL/ +" +# 3.1.8 is missing from pypi: https://github.com/mcfletch/pyopengl/issues/123 +SRC_URI="https://github.com/mcfletch/pyopengl/archive/refs/tags/release-${PV}.tar.gz -> ${P}.gh.tar.gz" +S="${WORKDIR}"/${PN}-release-${PV} + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux" +IUSE="tk" + +RDEPEND=" + media-libs/freeglut + virtual/opengl + x11-libs/libXi + x11-libs/libXmu + tk? ( dev-tcltk/togl ) +" +DEPEND=" + ${RDEPEND} +" + +# The tests need an X server with the GLX extension. Software rendering +# under Xvfb works but only with llvmpipe, not softpipe or swr. +BDEPEND=" + test? ( + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/pygame[${PYTHON_USEDEP},opengl,X] + !prefix? ( + media-libs/mesa[llvm] + x11-base/xorg-server[-minimal,xorg] + ) + ) +" + +distutils_enable_tests pytest + +PATCHES=( + # https://github.com/mcfletch/pyopengl/pull/109 + "${FILESDIR}/${PN}-3.1.7-pypy3.patch" + # https://github.com/mcfletch/pyopengl/issues/123 + "${FILESDIR}/${P}-fix-version.patch" +) + +python_test() { + local EPYTEST_DESELECT=( + # unreliable memory counting test + tests/test_vbo_memusage.py::test_sf_2980896 + ) + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + + nonfatal epytest tests || die "Tests failed with ${EPYTHON}" +} + +src_test() { + virtx distutils-r1_src_test +}
