From 03f07d5544f5c4ef9baffe5924a14386d2128eff Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 27 Jun 2020 15:06:14 +0200 Subject: [PATCH 1/6] gnu: Add python-pyopengl. * gnu/packages/python-xyz.scm (python-pyopengl): New variable. --- gnu/packages/python-xyz.scm | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 300277f045..d6966dceeb 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -15362,6 +15362,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") -- 2.26.2