[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50505] [PATCH v2 05/13] gnu: Add python-pyglet.
From: |
Daniel Meißner |
Subject: |
[bug#50505] [PATCH v2 05/13] gnu: Add python-pyglet. |
Date: |
Wed, 15 Sep 2021 17:25:11 +0200 |
* gnu/packages/python-xyz.scm (python-pyglet): New variable.
---
gnu/packages/python-xyz.scm | 58 +++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f10858d315..a48c228158 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18971,6 +18971,64 @@ quality, with less code written. The majority of the
moderngl code base is
also written in C++ for high performance.")
(license license:expat)))
+(define-public python-pyglet
+ (package
+ (name "python-pyglet")
+ (version "1.5.18")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyglet" version ".zip"))
+ (sha256
+ (base32
+ "044ib8x6pv5rjwj210hq37ry7vi5bizmqkkv1zj8967prk5ii8sq"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-lib-paths
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* '("pyglet/gl/lib_glx.py")
+ (("'GL'")
+ (string-append "\"" (assoc-ref inputs "mesa")
+ "/lib/libGL.so\""))
+ (("'GLU'")
+ (string-append "\"" (assoc-ref inputs "glu")
+ "/lib/libGLU.so\"")))
+ (substitute* '("pyglet/font/freetype_lib.py")
+ (("'freetype'")
+ (string-append "\"" (assoc-ref inputs "freetype")
+ "/lib/libfreetype.so\"")))
+ (substitute* '("pyglet/font/fontconfig.py")
+ (("'fontconfig'")
+ (string-append "\"" (assoc-ref inputs "fontconfig")
+ "/lib/libfontconfig.so\"")))))
+ (add-before 'check 'prepare-x
+ (lambda _
+ (system "Xvfb :1 &")
+ (setenv "DISPLAY" ":1")))
+ (replace 'check
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "tests/unit"))))))
+ (inputs
+ `(("mesa" ,mesa)
+ ("glu" ,glu)
+ ("freetype" ,freetype)
+ ("fontconfig" ,fontconfig)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("python-pytest" ,python-pytest)
+ ("xorg-server" ,xorg-server-for-tests)))
+ (home-page "https://pyglet.readthedocs.io")
+ (synopsis "Cross-platform windowing and multimedia Python library")
+ (description
+ "Pyglet is a Python library for developing games and other visually-rich
+applications. It supports windowing, user interface event handling,
+Joysticks, OpenGL graphics, loading images and videos, and playing sounds and
+music. All of this with a friendly Pythonic API that's simple to learn.")
+ (license license:bsd-3)))
+
(define-public python-rencode
(package
(name "python-rencode")
--
2.33.0
- [bug#50505] [PATCH 05/12] gnu: Add python-pyglet., (continued)
[bug#50505] [PATCH v2 02/13] gnu: Add python-cloup-0.7., Daniel Meißner, 2021/09/15
[bug#50505] [PATCH v2 00/13] Add python-manim, Daniel Meißner, 2021/09/15
[bug#50505] [PATCH v2 05/13] gnu: Add python-pyglet.,
Daniel Meißner <=
[bug#50505] [PATCH v2 08/13] gnu: Add python-screeninfo., Daniel Meißner, 2021/09/15
[bug#50505] [PATCH v2 04/13] gnu: Add python-moderngl., Daniel Meißner, 2021/09/15
[bug#50505] [PATCH v2 01/13] gnu: Add python-cloup., Daniel Meißner, 2021/09/15
[bug#50505] [PATCH v2 06/13] gnu: Add python-multipledispatch., Daniel Meißner, 2021/09/15
[bug#50505] [PATCH v2 07/13] gnu: Add python-pyrr., Daniel Meißner, 2021/09/15
[bug#50505] [PATCH v2 12/13] gnu: Add python-screeninfo-0.6., Daniel Meißner, 2021/09/15
[bug#50505] [PATCH v2 13/13] gnu: Add python-manim 0.9.0., Daniel Meißner, 2021/09/15
[bug#50505] [PATCH v2 11/13] gnu: Add python-mapbox-earcut., Daniel Meißner, 2021/09/15
[bug#50505] [PATCH v2 03/13] gnu: Add python-glcontext., Daniel Meißner, 2021/09/15
[bug#50505] [PATCH v2 10/13] gnu: Add python-manimpango., Daniel Meißner, 2021/09/15