summaryrefslogtreecommitdiff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2020-06-27 15:06:14 +0200
committerLudovic Courtès <ludo@gnu.org>2020-07-13 12:52:52 +0200
commitc5384ea3137243f77d901a51c45c5f489fa452f1 (patch)
treef66a356d1aef84f80fb02e09b676a73e3084f071 /gnu/packages/python-xyz.scm
parent1cc3a0451e3e96aa2ca67742c40d158b6137872f (diff)
downloadguix-patches-c5384ea3137243f77d901a51c45c5f489fa452f1.tar
guix-patches-c5384ea3137243f77d901a51c45c5f489fa452f1.tar.gz
gnu: Add python-pyopengl.
* gnu/packages/python-xyz.scm (python-pyopengl): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm46
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 109a14b0ae..f832793169 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15512,6 +15512,52 @@ library.")
(description
"This is the Cython-coded accelerator module for PyOpenGL.")))
+(define-public python-pyopengl
+ (package
+ (name "python-pyopengl")
+ (version "3.1.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "PyOpenGL" version))
+ (sha256
+ (base32
+ "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
+ (build-system python-build-system)
+ (inputs
+ `(("mesa" ,mesa)
+ ("freeglut" ,freeglut)
+ ("glu" ,glu)))
+ (arguments
+ `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
+ ;attribute 'OSMesa'
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-paths
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* '("OpenGL/platform/ctypesloader.py")
+ (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
+ (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
+ (("'GL'")
+ (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
+ (("'GLU'")
+ (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
+ (("'glut',")
+ (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
+ (("'GLESv1_CM'")
+ (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
+ (("'GLESv2'")
+ (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
+ ;; Not providing libgle. It seems to be very old.
+ #t)))))
+ (home-page "http://pyopengl.sourceforge.net")
+ (synopsis "Standard OpenGL bindings for Python")
+ (description
+ "PyOpenGL is the most common cross platform Python binding to OpenGL and
+related APIs. The binding is created using the standard @code{ctypes}
+library.")
+ (license license:bsd-3)))
+
(define-public python-rencode
(package
(name "python-rencode")