summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-11-17 20:06:53 +0100
committerMichał Górny <mgorny@gentoo.org>2023-11-17 21:39:25 +0100
commit12e756e356090a641a4b12f4817953599f0260ee (patch)
treeaec6bd58abd99ffd4009a75d916d76792a86dc6f
parentdev-python/beniget: Enable pypy3 (diff)
downloadgentoo-12e756e356090a641a4b12f4817953599f0260ee.tar.gz
gentoo-12e756e356090a641a4b12f4817953599f0260ee.tar.bz2
gentoo-12e756e356090a641a4b12f4817953599f0260ee.zip
dev-python/pyopengl: Enable pypy3
Sponsored-by: Ex Makhina, Inc. <info-gentoo@exmakhina.com> Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/pyopengl/files/pyopengl-3.1.7-pypy3.patch26
-rw-r--r--dev-python/pyopengl/pyopengl-3.1.7-r1.ebuild (renamed from dev-python/pyopengl/pyopengl-3.1.7.ebuild)4
2 files changed, 29 insertions, 1 deletions
diff --git a/dev-python/pyopengl/files/pyopengl-3.1.7-pypy3.patch b/dev-python/pyopengl/files/pyopengl-3.1.7-pypy3.patch
new file mode 100644
index 000000000000..f3a434cf290f
--- /dev/null
+++ b/dev-python/pyopengl/files/pyopengl-3.1.7-pypy3.patch
@@ -0,0 +1,26 @@
+From 33da175a6d89945ea9e74e85df8ef8929fc86b62 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 17 Nov 2023 19:56:58 +0100
+Subject: [PATCH] PYPY3 Add support for pypy3 in FormatHandler
+
+Add `_ctypes.array.ArrayMeta` to classes recognized by `ctypesarrays`
+formathandler. This is the class used by arrays on PyPy3.10. Adding
+this makes the test suite pass on PyPy3.10 7.3.13.
+
+Fixes #108
+---
+ OpenGL/__init__.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/OpenGL/__init__.py b/OpenGL/__init__.py
+index 77dc8c0b..959186ce 100644
+--- a/OpenGL/__init__.py
++++ b/OpenGL/__init__.py
+@@ -301,6 +301,7 @@ def setPlatform(key):
+ "_ctypes.PyCArrayType",
+ "_ctypes.Array",
+ "_ctypes.array.Array",
++ "_ctypes.array.ArrayMeta",
+ ],
+ isOutput=True,
+ )
diff --git a/dev-python/pyopengl/pyopengl-3.1.7.ebuild b/dev-python/pyopengl/pyopengl-3.1.7-r1.ebuild
index 52f90ccbfbbf..4ba447f89f0e 100644
--- a/dev-python/pyopengl/pyopengl-3.1.7.ebuild
+++ b/dev-python/pyopengl/pyopengl-3.1.7-r1.ebuild
@@ -7,7 +7,7 @@ DISTUTILS_USE_PEP517=setuptools
PYPI_NO_NORMALIZE=1
PYPI_PN=PyOpenGL
PYTHON_REQ_USE="tk?"
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( pypy3 python3_{10..12} )
inherit distutils-r1 pypi virtualx
@@ -52,6 +52,8 @@ distutils_enable_tests pytest
PATCHES=(
# https://github.com/mcfletch/pyopengl/commit/b49af26c615236ebc29cf125a8315091482a4a2a
"${FILESDIR}/${P}-py312.patch"
+ # https://github.com/mcfletch/pyopengl/pull/109
+ "${FILESDIR}/${P}-pypy3.patch"
)
EPYTEST_DESELECT=(