unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / Atom feed
* [bug#50505] [PATCH 00/12] gnu: Add python-manim
@ 2021-09-10 11:22 Daniel Meißner via Guix-patches via
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
                   ` (15 more replies)
  0 siblings, 16 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-10 11:22 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

Hi Guix!

This patch series adds the necessary packages for Manim, an animation engine
for mathematical animations which can be used in educational maths videos.  I
have read the "Submitting Patches" section in the Guix manual and have
confirmed that the packages build as expected.  However, I have disabled tests
for the following packages:

* python-manim
* python-mapbox-earcut
* python-moderngl-window
* python-pyglet
* python-moderngl

This is either because they need a DISPLAY to conduct the tests or because the
tests are failing and I don't know how to fix it.  Your help will be
appreciated :)

Thanks,
Daniel

Daniel Meißner (12):
  gnu: Add python-cloup.
  gnu: Add python-cloup-0.7.
  gnu: Add python-glcontext.
  gnu: Add python-moderngl.
  gnu: Add python-pyglet.
  gnu: Add python-multipledispatch.
  gnu: Add python-pyrr.
  gnu: Add python-screeninfo.
  gnu: Add python-moderngl-window.
  gnu: Add python-manimpango.
  gnu: Add python-mapbox-earcut.
  gnu: Add python-manim 0.9.0.

 gnu/local.mk                                  |   2 +
 .../python-manimpango-remove-manim-dep.patch  | 172 +++++++++++
 gnu/packages/python-science.scm               |  82 +++++
 gnu/packages/python-xyz.scm                   | 289 ++++++++++++++++++
 4 files changed, 545 insertions(+)
 create mode 100644 gnu/packages/patches/python-manimpango-remove-manim-dep.patch

-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 01/12] gnu: Add python-cloup.
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
@ 2021-09-10 11:24 ` Daniel Meißner via Guix-patches via
  2021-09-10 11:24   ` [bug#50505] [PATCH 02/12] gnu: Add python-cloup-0.7 Daniel Meißner via Guix-patches via
                     ` (11 more replies)
  2021-09-10 14:40 ` [bug#50505] [PATCH 00/12] gnu: Add python-manim Liliana Marie Prikler
                   ` (14 subsequent siblings)
  15 siblings, 12 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-10 11:24 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-cloup): New variable.
---
 gnu/packages/python-science.scm |  1 +
 gnu/packages/python-xyz.scm     | 31 +++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 738b504e3b..d3730fadcc 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2021 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e98eec19bc..6c7ab10216 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3308,6 +3308,37 @@ with sensible defaults out of the box.")
         (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
     (arguments `())))
 
+(define-public python-cloup
+  (package
+    (name "python-cloup")
+    (version "0.11.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "cloup" version))
+       (sha256
+        (base32
+         "07kxw81bml137w9bfmwkjbdzbldkk1k1lws82wffz9244pp7k8ib"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  ;; test phase fails with "error: invalid command pytest"
+                  (delete 'check))))
+    (propagated-inputs
+     `(("python-click" ,python-click)))
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)
+       ("python-setuptools-scm" ,python-setuptools-scm/next)
+       ("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/janLuke/cloup")
+    (synopsis "Extension library for python-click")
+    (description
+     "Cloup — originally from \"Click + option groups\" — enriches Click with
+several features that make it more expressive and configurable: option groups,
+constraints, subcommand aliases, subcommands sections and a themeable
+HelpFormatter.")
+    (license license:bsd-3)))
+
 (define-public python-vcversioner
   (package
     (name "python-vcversioner")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 02/12] gnu: Add python-cloup-0.7.
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
@ 2021-09-10 11:24   ` Daniel Meißner via Guix-patches via
  2021-09-10 11:24   ` [bug#50505] [PATCH 03/12] gnu: Add python-glcontext Daniel Meißner via Guix-patches via
                     ` (10 subsequent siblings)
  11 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-10 11:24 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-cloup-0.7): New variable.
---
 gnu/packages/python-xyz.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6c7ab10216..75646aec7f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3339,6 +3339,18 @@ constraints, subcommand aliases, subcommands sections and a themeable
 HelpFormatter.")
     (license license:bsd-3)))
 
+(define-public python-cloup-0.7
+  (package (inherit python-cloup)
+    (name "python-cloup-0.7")
+    (version "0.7.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "cloup" version))
+       (sha256
+        (base32
+         "0yyxibwlxmdkm4866fm4rwpdgy3d6y18n061992ckr54vl0cav7j"))))))
+
 (define-public python-vcversioner
   (package
     (name "python-vcversioner")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 03/12] gnu: Add python-glcontext.
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
  2021-09-10 11:24   ` [bug#50505] [PATCH 02/12] gnu: Add python-cloup-0.7 Daniel Meißner via Guix-patches via
@ 2021-09-10 11:24   ` Daniel Meißner via Guix-patches via
  2021-09-11 19:42     ` Xinglu Chen
  2021-09-10 11:24   ` [bug#50505] [PATCH 04/12] gnu: Add python-moderngl Daniel Meißner via Guix-patches via
                     ` (9 subsequent siblings)
  11 siblings, 1 reply; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-10 11:24 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-glcontext): 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 75646aec7f..251aad5b61 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18884,6 +18884,52 @@ library.")
     (description
      "This is the Cython-coded accelerator module for PyOpenGL.")))
 
+(define-public python-glcontext
+  (package
+   (name "python-glcontext")
+   (version "2.3.4")
+   (source
+    (origin
+     (method git-fetch)
+     (uri (git-reference
+           (url "https://github.com/moderngl/glcontext")
+           (commit version)))
+     (file-name (git-file-name name version))
+     (sha256
+      (base32
+       "1m2zkl696vqmgrd5k1c5kl0krk6qgjgsz88qhahwva0l40bswvhp"))))
+   (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* '("glcontext/x11.cpp" "glcontext/egl.cpp")
+              (("\"libGL.so\"")
+               (string-append "\"" (assoc-ref inputs "mesa") "/lib/libGL.so\""))
+              (("\"libEGL.so\"")
+               (string-append "\"" (assoc-ref inputs "mesa") "/lib/libEGL.so\""))
+              (("\"libX11.so\"")
+               (string-append "\"" (assoc-ref inputs "libx11") "/lib/libX11.so\"")))
+            (substitute* '("glcontext/__init__.py")
+              (("find_library\\('GL'\\)")
+               (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
+              (("find_library\\('EGL'\\)")
+               (string-append "'" (assoc-ref inputs "mesa") "/lib/libEGL.so'"))
+              (("find_library\\(\"X11\"\\)")
+               (string-append "'" (assoc-ref inputs "libx11") "/lib/libX11.so'")))
+            #t))
+        ;; tests fail with: Exception: (standalone) XOpenDisplay: cannot open display
+        (delete 'check))))
+   (inputs
+    `(("libx11" ,libx11)
+      ("mesa" ,mesa)))
+   (home-page "https://github.com/moderngl/glcontext")
+   (synopsis "Portable OpenGL Context for ModernGL")
+   (description "Python-glcontext is a library providing OpenGL implementation
+for ModernGL on multiple platforms.")
+   (license license:expat)))
+
 (define-public python-rencode
   (package
    (name "python-rencode")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 04/12] gnu: Add python-moderngl.
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
  2021-09-10 11:24   ` [bug#50505] [PATCH 02/12] gnu: Add python-cloup-0.7 Daniel Meißner via Guix-patches via
  2021-09-10 11:24   ` [bug#50505] [PATCH 03/12] gnu: Add python-glcontext Daniel Meißner via Guix-patches via
@ 2021-09-10 11:24   ` Daniel Meißner via Guix-patches via
  2021-09-11 19:46     ` Xinglu Chen
  2021-09-10 11:24   ` [bug#50505] [PATCH 05/12] gnu: Add python-pyglet Daniel Meißner via Guix-patches via
                     ` (8 subsequent siblings)
  11 siblings, 1 reply; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-10 11:24 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-moderngl): New variable.
---
 gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 251aad5b61..394f30226f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18930,6 +18930,33 @@ library.")
 for ModernGL on multiple platforms.")
    (license license:expat)))
 
+(define-public python-moderngl
+  (package
+    (name "python-moderngl")
+    (version "5.6.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "moderngl" version))
+       (sha256
+        (base32
+         "1ysinnyr3rkdisbihdrn1623l3rw45nx8p2j31dgffsykxah8vcc"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-glcontext" ,python-glcontext)))
+    (home-page
+     "https://github.com/moderngl/moderngl")
+    (synopsis
+     "Python wrapper for OpenGL")
+    (description "ModernGL is a python wrapper over OpenGL 3.3+ core that
+simplifies the creation of simple graphics applications like scientific
+simulations, games or user interfaces.  Usually, acquiring in-depth knowledge
+of OpenGL requires a steep learning curve.  In contrast, ModernGL is easy to
+learn and use, moreover it is capable of rendering with high performance and
+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-rencode
   (package
    (name "python-rencode")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 05/12] gnu: Add python-pyglet.
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
                     ` (2 preceding siblings ...)
  2021-09-10 11:24   ` [bug#50505] [PATCH 04/12] gnu: Add python-moderngl Daniel Meißner via Guix-patches via
@ 2021-09-10 11:24   ` Daniel Meißner via Guix-patches via
  2021-09-11 19:49     ` Xinglu Chen
  2021-09-10 11:24   ` [bug#50505] [PATCH 06/12] gnu: Add python-multipledispatch Daniel Meißner via Guix-patches via
                     ` (7 subsequent siblings)
  11 siblings, 1 reply; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-10 11:24 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-pyglet): New variable.
---
 gnu/packages/python-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 394f30226f..e1e676490b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18957,6 +18957,48 @@ 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
+     '(;; tests fail with: TypeError: don't know how to make test from:
+       ;; <pyglet._ModuleProxy object at ...>
+       #:tests? #f
+       #: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\"")))
+                      #t)))))
+    (inputs
+     `(("mesa" ,mesa)
+       ("glu" ,glu)))
+    (native-inputs `(("unzip" ,unzip)))
+    (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





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 06/12] gnu: Add python-multipledispatch.
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
                     ` (3 preceding siblings ...)
  2021-09-10 11:24   ` [bug#50505] [PATCH 05/12] gnu: Add python-pyglet Daniel Meißner via Guix-patches via
@ 2021-09-10 11:24   ` Daniel Meißner via Guix-patches via
  2021-09-11 19:52     ` Xinglu Chen
  2021-09-10 11:24   ` [bug#50505] [PATCH 07/12] gnu: Add python-pyrr Daniel Meißner via Guix-patches via
                     ` (6 subsequent siblings)
  11 siblings, 1 reply; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-10 11:24 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-multipledispatch): New variable.
---
 gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e1e676490b..0102dbc4bb 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18957,6 +18957,26 @@ 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-multipledispatch
+  (package
+    (name "python-multipledispatch")
+    (version "0.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "multipledispatch" version))
+       (sha256
+        (base32
+         "1slblghfjg9fdi9zpd7gmrkvfbv20nrdgnrymcnbky8bzm8i9ax7"))))
+    (build-system python-build-system)
+    (propagated-inputs `(("python-six" ,python-six)))
+    (home-page
+     "https://github.com/mrocklin/multipledispatch/")
+    (synopsis "Multiple dispatch library for Python")
+    (description "This library defines a decorator that makes dispatching on
+types more concise to write. ")
+    (license license:bsd-3)))
+
 (define-public python-pyglet
   (package
     (name "python-pyglet")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 07/12] gnu: Add python-pyrr.
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
                     ` (4 preceding siblings ...)
  2021-09-10 11:24   ` [bug#50505] [PATCH 06/12] gnu: Add python-multipledispatch Daniel Meißner via Guix-patches via
@ 2021-09-10 11:24   ` Daniel Meißner via Guix-patches via
  2021-09-11 19:58     ` Xinglu Chen
  2021-09-10 11:24   ` [bug#50505] [PATCH 08/12] gnu: Add python-screeninfo Daniel Meißner via Guix-patches via
                     ` (5 subsequent siblings)
  11 siblings, 1 reply; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-10 11:24 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-pyrr): New variable.
---
 gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0102dbc4bb..eb0e67c98d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18977,6 +18977,31 @@ also written in C++ for high performance.")
 types more concise to write. ")
     (license license:bsd-3)))
 
+(define-public python-pyrr
+  (package
+    (name "python-pyrr")
+    (version "0.10.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pyrr" version))
+       (sha256
+        (base32
+         "07byxkq8dcc8n6fc2q7g3vq3mxzzj0hqzm8hlq3gfwbf68h7n3rw"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-multipledispatch" ,python-multipledispatch)
+       ("python-numpy" ,python-numpy)))
+    (home-page
+     "https://github.com/adamlwgriffiths/Pyrr")
+    (synopsis
+     "Mathematical functions for 3D graphics using NumPy")
+    (description
+     "A collection of object-oriented and procedural interfaces for working
+with matrices, quaternions, vectors and plane/line/ray objects for 3D
+graphics.")
+    (license license:bsd-3)))
+
 (define-public python-pyglet
   (package
     (name "python-pyglet")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 08/12] gnu: Add python-screeninfo.
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
                     ` (5 preceding siblings ...)
  2021-09-10 11:24   ` [bug#50505] [PATCH 07/12] gnu: Add python-pyrr Daniel Meißner via Guix-patches via
@ 2021-09-10 11:24   ` Daniel Meißner via Guix-patches via
  2021-09-10 11:24   ` [bug#50505] [PATCH 09/12] gnu: Add python-moderngl-window Daniel Meißner via Guix-patches via
                     ` (4 subsequent siblings)
  11 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-10 11:24 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-screeninfo): New variable.
---
 gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index eb0e67c98d..bdda967d94 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19044,6 +19044,28 @@ 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-screeninfo
+  (package
+   (name "python-screeninfo")
+   (version "0.7")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (pypi-uri "screeninfo" version))
+     (sha256
+      (base32
+       "007m7sqv30qak56885dxbijksrg2hd121hfpvg2llm734wspra8j"))))
+   (build-system python-build-system)
+   (native-inputs `(("python-pytest" ,python-pytest)))
+   (home-page "https://github.com/rr-/screeninfo")
+   (synopsis
+    "Obtain information about physical screens")
+   (description
+    "This python module provides means to access information about physical
+screens like resolution, height and width of the screen, connecting port
+etc.")
+   (license (list license:expat license:bsd-3))))
+
 (define-public python-rencode
   (package
    (name "python-rencode")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 09/12] gnu: Add python-moderngl-window.
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
                     ` (6 preceding siblings ...)
  2021-09-10 11:24   ` [bug#50505] [PATCH 08/12] gnu: Add python-screeninfo Daniel Meißner via Guix-patches via
@ 2021-09-10 11:24   ` Daniel Meißner via Guix-patches via
  2021-09-10 11:25   ` [bug#50505] [PATCH 10/12] gnu: Add python-manimpango Daniel Meißner via Guix-patches via
                     ` (3 subsequent siblings)
  11 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-10 11:24 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-moderngl-window): New variable.
---
 gnu/packages/python-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bdda967d94..765b3f0a57 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19044,6 +19044,41 @@ 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-moderngl-window
+  (package
+   (name "python-moderngl-window")
+   (version "2.4.0")
+   (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://github.com/moderngl/moderngl-window")
+                  (commit version)))
+            (file-name (git-file-name name version))
+            (sha256
+             (base32
+              "1fvhm6ln3q5kl5m5q3gzfmx1kpyn054fhpcrgpqz8809dxi7pzcv"))))
+   (build-system python-build-system)
+   (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; tests fail with: TypeError: don't know how to make test from:
+         ;; <moderngl_window.resources.data.DataFiles object at ...>
+         (delete 'check))))
+   (propagated-inputs
+    `(("python-pillow" ,python-pillow)
+      ("python-pyrr" ,python-pyrr)
+      ("python-numpy" ,python-numpy)
+      ("python-moderngl" ,python-moderngl)
+      ("python-pyglet" ,python-pyglet)))
+   (home-page "https://github.com/moderngl/moderngl-window")
+   (synopsis "Cross-platform utility library for ModernGL")
+   (description "This ModernGL utility library simplifies window creation and
+resource loading.  You can create a window for ModernGL using pyglet, pygame,
+PySide2, GLFW, SDL2, PyQt5 or tkinter.  Events are unified into a single event
+system.  Resource loading includes loading of 2D textures/texture arrays,
+shaders and objects/scenes.")
+   (license license:expat)))
+
 (define-public python-screeninfo
   (package
    (name "python-screeninfo")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 10/12] gnu: Add python-manimpango.
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
                     ` (7 preceding siblings ...)
  2021-09-10 11:24   ` [bug#50505] [PATCH 09/12] gnu: Add python-moderngl-window Daniel Meißner via Guix-patches via
@ 2021-09-10 11:25   ` Daniel Meißner via Guix-patches via
  2021-09-10 11:25   ` [bug#50505] [PATCH 11/12] gnu: Add python-mapbox-earcut Daniel Meißner via Guix-patches via
                     ` (2 subsequent siblings)
  11 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-10 11:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-science.scm (python-manimpango): New variable.
---
 gnu/local.mk                                  |   2 +
 .../python-manimpango-remove-manim-dep.patch  | 172 ++++++++++++++++++
 gnu/packages/python-science.scm               |  28 +++
 3 files changed, 202 insertions(+)
 create mode 100644 gnu/packages/patches/python-manimpango-remove-manim-dep.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 175e691a63..87be4a1b0a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -44,6 +44,7 @@
 # Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
 # Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
 # Copyright © 2021 Dmitry Polyakov <polyakov@liltechdude.xyz>
+# Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
 #
 # This file is part of GNU Guix.
 #
@@ -1646,6 +1647,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/python-pyfakefs-remove-bad-test.patch	\
   %D%/packages/patches/python-flint-includes.patch		\
   %D%/packages/patches/python-libxml2-utf8.patch		\
+  %D%/packages/patches/python-manimpango-remove-manim-dep.patch \
   %D%/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch	\
   %D%/packages/patches/python-memcached-syntax-warnings.patch	\
   %D%/packages/patches/python-mox3-python3.6-compat.patch	\
diff --git a/gnu/packages/patches/python-manimpango-remove-manim-dep.patch b/gnu/packages/patches/python-manimpango-remove-manim-dep.patch
new file mode 100644
index 0000000000..579c2302d8
--- /dev/null
+++ b/gnu/packages/patches/python-manimpango-remove-manim-dep.patch
@@ -0,0 +1,172 @@
+Fix dependency on manim for tests
+
+This fixes a circular dependency between manim and manimpango.
+
+Extracted from upstream:
+https://github.com/ManimCommunity/ManimPango/commit/7e2b17aa14b10bd58af0598cc2de51a406682797
+
+diff --git a/tests/_manim.py b/tests/_manim.py
+index 3ea4676..b11d3e9 100644
+--- a/tests/_manim.py
++++ b/tests/_manim.py
+@@ -2,11 +2,12 @@
+ """This file contains helpers for the tests copied and modified
+ from Manim.
+ """
+-
++import copy
+ import os
++import re
+ from pathlib import Path
+
+-from manimpango import Alignment, MarkupUtils
++from manimpango import Alignment, MarkupUtils, TextSetting, text2svg
+
+
+ class MarkupText:
+@@ -104,3 +105,115 @@ class MarkupText:
+
+     def __repr__(self):
+         return f"MarkupText({repr(self.original_text)})"
++
++
++class Text:
++    def __init__(
++        self,
++        text: str,
++        fill_opacity: float = 1.0,
++        stroke_width: int = 0,
++        size: int = 1,
++        line_spacing: int = -1,
++        font: str = "",
++        slant: str = "NORMAL",
++        weight: str = "NORMAL",
++        gradient: tuple = None,
++        tab_width: int = 4,
++        disable_ligatures: bool = False,
++        filename: str = "text.svg",
++        **kwargs,
++    ) -> None:
++        self.size = size
++        self.filename = filename
++        self.line_spacing = line_spacing
++        self.font = font
++        self.slant = slant
++        self.weight = weight
++        self.gradient = gradient
++        self.tab_width = tab_width
++        self.original_text = text
++        self.disable_ligatures = disable_ligatures
++        text_without_tabs = text
++        self.t2f = self.t2s = self.t2w = {}
++        if text.find("\t") != -1:
++            text_without_tabs = text.replace("\t", " " * self.tab_width)
++        self.text = text_without_tabs
++        if self.line_spacing == -1:
++            self.line_spacing = self.size + self.size * 0.3
++        else:
++            self.line_spacing = self.size + self.size * self.line_spacing
++        self.text2svg()
++
++    def text2settings(self):
++        """Internally used function. Converts the texts and styles
++        to a setting for parsing."""
++        settings = []
++        t2x = [self.t2f, self.t2s, self.t2w]
++        for i in range(len(t2x)):
++            fsw = [self.font, self.slant, self.weight]
++            if t2x[i]:
++                for word, x in list(t2x[i].items()):
++                    for start, end in self.find_indexes(word, self.text):
++                        fsw[i] = x
++                        settings.append(TextSetting(start, end, *fsw))
++        # Set all text settings (default font, slant, weight)
++        fsw = [self.font, self.slant, self.weight]
++        settings.sort(key=lambda setting: setting.start)
++        temp_settings = settings.copy()
++        start = 0
++        for setting in settings:
++            if setting.start != start:
++                temp_settings.append(TextSetting(start, setting.start, *fsw))
++            start = setting.end
++        if start != len(self.text):
++            temp_settings.append(TextSetting(start, len(self.text), *fsw))
++        settings = sorted(temp_settings, key=lambda setting: setting.start)
++
++        if re.search(r"\n", self.text):
++            line_num = 0
++            for start, end in self.find_indexes("\n", self.text):
++                for setting in settings:
++                    if setting.line_num == -1:
++                        setting.line_num = line_num
++                    if start < setting.end:
++                        line_num += 1
++                        new_setting = copy.copy(setting)
++                        setting.end = end
++                        new_setting.start = end
++                        new_setting.line_num = line_num
++                        settings.append(new_setting)
++                        settings.sort(key=lambda setting: setting.start)
++                        break
++        for setting in settings:
++            if setting.line_num == -1:
++                setting.line_num = 0
++        return settings
++
++    def text2svg(self):
++        """Internally used function.
++        Convert the text to SVG using Pango
++        """
++        size = self.size * 10
++        line_spacing = self.line_spacing * 10
++        dir_name = Path(self.filename).parent
++        disable_liga = self.disable_ligatures
++        if not os.path.exists(dir_name):
++            os.makedirs(dir_name)
++        file_name = self.filename
++        settings = self.text2settings()
++        width = 600
++        height = 400
++
++        return text2svg(
++            settings,
++            size,
++            line_spacing,
++            disable_liga,
++            file_name,
++            30,
++            30,
++            width,
++            height,
++            self.text,
++        )
+diff --git a/tests/test_fonts.py b/tests/test_fonts.py
+index 51e7eb4..da42895 100644
+--- a/tests/test_fonts.py
++++ b/tests/test_fonts.py
+@@ -3,13 +3,12 @@ import sys
+ from pathlib import Path
+ from shutil import copyfile
+
+-import manim
+ import pytest
+
+ import manimpango
+
+ from . import FONT_DIR
+-from ._manim import MarkupText
++from ._manim import MarkupText, Text
+
+ font_lists = {
+     (FONT_DIR / "AdobeVFPrototype.ttf").absolute(): "Adobe Variable Font Prototype",
+@@ -38,7 +37,7 @@ def test_register_font(font_name):
+ @pytest.mark.parametrize("font_name", font_lists.values())
+ def test_warning(capfd, font_name):
+     print(font_name)
+-    manim.Text("Testing", font=font_name)
++    Text("Testing", font=font_name)
+     captured = capfd.readouterr()
+     assert "Pango-WARNING **" not in captured.err, "Looks like pango raised a warning?"
+
+--
+2.32.0
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index d3730fadcc..fcd983520c 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -38,6 +38,7 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages image-processing)
   #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages maths)
@@ -982,3 +983,30 @@ pandas notebooks, scripts, and libraries.  Unlike other distributed DataFrame
 libraries, Modin provides seamless integration and compatibility with existing
 pandas code.")
     (license license:asl2.0)))
+
+(define-public python-manimpango
+  (package
+    (name "python-manimpango")
+    (version "0.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ManimPango" version))
+       (sha256
+        (base32
+         "1j2mbhf7d82718nkc0r8x7cf35hlh13b67qkczjbbys3w24nyfsw"))
+       (patches (search-patches "python-manimpango-remove-manim-dep.patch"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("Cython" ,python-cython)
+       ("python-pytest" ,python-pytest)))
+    (inputs
+     `(("pango" ,pango)))
+    (home-page "https://manimpango.manim.community/")
+    (synopsis
+     "Bindings for pango for use with Manim")
+    (description
+     "These are Python bindings for Pango to be used with the mathematical
+animation software Manim.")
+    (license license:gpl3+)))
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 11/12] gnu: Add python-mapbox-earcut.
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
                     ` (8 preceding siblings ...)
  2021-09-10 11:25   ` [bug#50505] [PATCH 10/12] gnu: Add python-manimpango Daniel Meißner via Guix-patches via
@ 2021-09-10 11:25   ` Daniel Meißner via Guix-patches via
  2021-09-10 11:25   ` [bug#50505] [PATCH 12/12] gnu: Add python-manim 0.9.0 Daniel Meißner via Guix-patches via
  2021-09-11 19:33   ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Xinglu Chen
  11 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-10 11:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-science.scm (python-mapbox-earcut): New variable.
---
 gnu/packages/python-xyz.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 765b3f0a57..00ed032855 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19079,6 +19079,35 @@ system.  Resource loading includes loading of 2D textures/texture arrays,
 shaders and objects/scenes.")
    (license license:expat)))
 
+(define-public python-mapbox-earcut
+  (package
+    (name "python-mapbox-earcut")
+    (version "0.12.10")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "mapbox_earcut" version))
+       (sha256
+        (base32
+         "0ly48lijgd9inq07x42pfp9c24fn16vn9axpmfwqrkn979krbnah"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-numpy" ,python-numpy)))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-wheel" ,python-wheel)
+       ("setuptools-scm" ,python-setuptools-scm)
+       ("cmake" ,cmake)))
+    (home-page
+     "https://github.com/skogler/mapbox_earcut_python")
+    (synopsis
+     "Python bindings for the Mapbox Earcut C++ polygon triangulation library")
+    (description
+     "The Mapbox Earcut library is a header-only C++ library which provides a
+fast and robust triangulation of 2D polygons.  This package provides Python
+bindings for this library.")
+    (license license:isc)))
+
 (define-public python-screeninfo
   (package
    (name "python-screeninfo")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 12/12] gnu: Add python-manim 0.9.0.
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
                     ` (9 preceding siblings ...)
  2021-09-10 11:25   ` [bug#50505] [PATCH 11/12] gnu: Add python-mapbox-earcut Daniel Meißner via Guix-patches via
@ 2021-09-10 11:25   ` Daniel Meißner via Guix-patches via
  2021-09-11 19:33   ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Xinglu Chen
  11 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-10 11:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-science.scm (python-manim): New variable.
---
 gnu/packages/python-science.scm | 53 +++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index fcd983520c..d653ebca95 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -36,6 +36,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gtk)
@@ -1010,3 +1011,55 @@ pandas code.")
      "These are Python bindings for Pango to be used with the mathematical
 animation software Manim.")
     (license license:gpl3+)))
+
+(define-public python-manim
+  (package
+    (name "python-manim")
+    (version "0.9.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "manim" version))
+       (sha256
+        (base32
+         "0ksp57wcy45xkjips5i4wwm690mhbs2dmlcgsbmiwx78mfk4z0r3"))))
+    (build-system python-build-system)
+    (arguments '(;; tests fail with:
+                 ;; pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect
+                 ;; to "None"
+                 #:tests? #f))
+    (propagated-inputs
+     `(("python-click" ,python-click)
+       ("python-click-default-group"
+        ,python-click-default-group)
+       ("python-cloup" ,python-cloup-0.7)
+       ("python-colour" ,python-colour)
+       ("python-decorator" ,python-decorator)
+       ("python-manimpango" ,python-manimpango)
+       ("python-mapbox-earcut" ,python-mapbox-earcut)
+       ("python-moderngl" ,python-moderngl)
+       ("python-moderngl-window"
+        ,python-moderngl-window)
+       ("python-networkx" ,python-networkx)
+       ("python-numpy" ,python-numpy)
+       ("python-pillow" ,python-pillow)
+       ("python-pycairo" ,python-pycairo)
+       ("python-pydub" ,python-pydub)
+       ("python-pygments" ,python-pygments)
+       ("python-requests" ,python-requests)
+       ("python-rich" ,python-rich)
+       ("python-scipy" ,python-scipy)
+       ("python-screeninfo" ,python-screeninfo)
+       ("python-tqdm" ,python-tqdm)
+       ("python-watchdog" ,python-watchdog)))
+    (native-inputs
+     `(("python-wheel" ,python-wheel)))
+    (home-page "https://www.manim.community/")
+    (synopsis
+     "Python animation engine for explanatory math videos")
+    (description
+     "Manim is a Python library for creating mathematical animations.  The
+animations are written as Python code which is based on predefined objects.
+You can make animations with maths formulas (LaTeX-based), simple shapes, 3D
+objects, function graphs and more.")
+    (license license:expat)))
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 00/12] gnu: Add python-manim
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
@ 2021-09-10 14:40 ` Liliana Marie Prikler
  2021-09-13 14:30   ` Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 00/13] " Daniel Meißner via Guix-patches via
                   ` (13 subsequent siblings)
  15 siblings, 1 reply; 39+ messages in thread
From: Liliana Marie Prikler @ 2021-09-10 14:40 UTC (permalink / raw)
  To: Daniel Meißner, 50505

Hi Daniel,

Am Freitag, den 10.09.2021, 13:22 +0200 schrieb Daniel Meißner:
> Hi Guix!
> 
> This patch series adds the necessary packages for Manim, an animation
> engine for mathematical animations which can be used in educational
> maths videos.  I have read the "Submitting Patches" section in the
> Guix manual and have confirmed that the packages build as
> expected.  However, I have disabled tests for the following packages:
> 
> * python-manim
> * python-mapbox-earcut
> * python-moderngl-window
> * python-pyglet
> * python-moderngl
> 
> This is either because they need a DISPLAY to conduct the tests or
> because the tests are failing and I don't know how to fix it.  Your
> help will be appreciated :)
For the tests that need DISPLAY, the usual thing we do here is to spawn
an Xvfb for display :1 and set DISPLAY accordingly.  There are several
variants depending on what exactly else you need (some with dbus, some
without), simply grep for "xorg-server-for-tests" and you ought to find
one that fits your needs.

Once we find out the packages that fail regardless, that have no easy
fix, it is still acceptable to fix a few failing tests manually by
patching the test suite, or if all else fails use `#:tests? #f' with an
appropriate comment.

Regards





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 01/12] gnu: Add python-cloup.
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
                     ` (10 preceding siblings ...)
  2021-09-10 11:25   ` [bug#50505] [PATCH 12/12] gnu: Add python-manim 0.9.0 Daniel Meißner via Guix-patches via
@ 2021-09-11 19:33   ` Xinglu Chen
  2021-09-15 14:54     ` Daniel Meißner via Guix-patches via
  11 siblings, 1 reply; 39+ messages in thread
From: Xinglu Chen @ 2021-09-11 19:33 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner


[-- Attachment #1.1: Type: text/plain, Size: 2717 bytes --]

On Fri, Sep 10 2021, Daniel Meißner via Guix-patches via wrote:

> * gnu/packages/python-xyz.scm (python-cloup): New variable.
> ---
>  gnu/packages/python-science.scm |  1 +
>  gnu/packages/python-xyz.scm     | 31 +++++++++++++++++++++++++++++++
>  2 files changed, 32 insertions(+)
>
> diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
> index 738b504e3b..d3730fadcc 100644
> --- a/gnu/packages/python-science.scm
> +++ b/gnu/packages/python-science.scm
> @@ -14,6 +14,7 @@
>  ;;; Copyright © 2021 Roel Janssen <roel@gnu.org>
>  ;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
>  ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
> +;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index e98eec19bc..6c7ab10216 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -3308,6 +3308,37 @@ with sensible defaults out of the box.")
>          (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
>      (arguments `())))
>  
> +(define-public python-cloup
> +  (package
> +    (name "python-cloup")
> +    (version "0.11.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "cloup" version))
> +       (sha256
> +        (base32
> +         "07kxw81bml137w9bfmwkjbdzbldkk1k1lws82wffz9244pp7k8ib"))))
> +    (build-system python-build-system)
> +    (arguments
> +     '(#:phases (modify-phases %standard-phases
> +                  ;; test phase fails with "error: invalid command pytest"
> +                  (delete 'check))))

The tests run after applying the attached patch.  I also took the
liberty of fixing the formatting of the synopsis and description.  :-)

> +    (propagated-inputs
> +     `(("python-click" ,python-click)))
> +    (native-inputs
> +     `(("python-setuptools" ,python-setuptools)
> +       ("python-setuptools-scm" ,python-setuptools-scm/next)
> +       ("python-pytest" ,python-pytest)))
> +    (home-page "https://github.com/janLuke/cloup")
> +    (synopsis "Extension library for python-click")
> +    (description
> +     "Cloup — originally from \"Click + option groups\" — enriches Click with
> +several features that make it more expressive and configurable: option groups,
> +constraints, subcommand aliases, subcommands sections and a themeable
> +HelpFormatter.")
> +    (license license:bsd-3)))
> +
>  (define-public python-vcversioner
>    (package
>      (name "python-vcversioner")
> -- 
> 2.33.0


[-- Attachment #1.2: 0001-gnu-Add-python-cloup.patch --]
[-- Type: text/x-patch, Size: 2936 bytes --]

From 574d6706ee0472b2e5e10a42af9bf9ded017a3f1 Mon Sep 17 00:00:00 2001
Message-Id: <574d6706ee0472b2e5e10a42af9bf9ded017a3f1.1631388580.git.public@yoctocell.xyz>
From: =?UTF-8?q?Daniel=20Mei=C3=9Fner=20via=20Guix-patches=20via?=
 <guix-patches@gnu.org>
Date: Fri, 10 Sep 2021 13:24:51 +0200
Subject: [PATCH] gnu: Add python-cloup.

* gnu/packages/python-xyz.scm (python-cloup): New variable.

Co-authored-by: Xinglu Chen <public@yoctocell.xyz>
---
 gnu/packages/python-science.scm |  1 +
 gnu/packages/python-xyz.scm     | 35 +++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 738b504e3b..d3730fadcc 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2021 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 7c70829de9..2db7ccc0ee 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3307,6 +3307,41 @@ with sensible defaults out of the box.")
         (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
     (arguments `())))
 
+(define-public python-cloup
+  (package
+    (name "python-cloup")
+    (version "0.11.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "cloup" version))
+       (sha256
+        (base32
+         "07kxw81bml137w9bfmwkjbdzbldkk1k1lws82wffz9244pp7k8ib"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "-m" "pytest")))))))
+    (propagated-inputs
+     `(("python-click" ,python-click)))
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)
+       ("python-setuptools-scm" ,python-setuptools-scm/next)
+       ("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/janLuke/cloup")
+    (synopsis "Extension library for @code{python-click}")
+    (description
+     "Cloup---originally from ``Click + option groups''---enriches
+@code{python-click} with several features that make it more expressive and
+configurable: option groups, constraints, subcommand aliases, subcommands
+sections, and a themeable @code{HelpFormatter}.")
+    (license license:bsd-3)))
+
 (define-public python-vcversioner
   (package
     (name "python-vcversioner")
-- 
2.33.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 03/12] gnu: Add python-glcontext.
  2021-09-10 11:24   ` [bug#50505] [PATCH 03/12] gnu: Add python-glcontext Daniel Meißner via Guix-patches via
@ 2021-09-11 19:42     ` Xinglu Chen
  0 siblings, 0 replies; 39+ messages in thread
From: Xinglu Chen @ 2021-09-11 19:42 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

[-- Attachment #1: Type: text/plain, Size: 2961 bytes --]

On Fri, Sep 10 2021, Daniel Meißner via Guix-patches via wrote:

> * gnu/packages/python-xyz.scm (python-glcontext): 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 75646aec7f..251aad5b61 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -18884,6 +18884,52 @@ library.")
>      (description
>       "This is the Cython-coded accelerator module for PyOpenGL.")))
>  
> +(define-public python-glcontext
> +  (package
> +   (name "python-glcontext")
> +   (version "2.3.4")
> +   (source
> +    (origin
> +     (method git-fetch)
> +     (uri (git-reference
> +           (url "https://github.com/moderngl/glcontext")
> +           (commit version)))
> +     (file-name (git-file-name name version))
> +     (sha256
> +      (base32
> +       "1m2zkl696vqmgrd5k1c5kl0krk6qgjgsz88qhahwva0l40bswvhp"))))
> +   (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* '("glcontext/x11.cpp" "glcontext/egl.cpp")
> +              (("\"libGL.so\"")
> +               (string-append "\"" (assoc-ref inputs "mesa") "/lib/libGL.so\""))
> +              (("\"libEGL.so\"")
> +               (string-append "\"" (assoc-ref inputs "mesa") "/lib/libEGL.so\""))
> +              (("\"libX11.so\"")
> +               (string-append "\"" (assoc-ref inputs "libx11") "/lib/libX11.so\"")))

Please keep lines =<80 columns wide.  Also I would use a ‘let’ form to
avoid writing (assoc-ref inputs "mesa") twice.

> +            (substitute* '("glcontext/__init__.py")
> +              (("find_library\\('GL'\\)")
> +               (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
> +              (("find_library\\('EGL'\\)")
> +               (string-append "'" (assoc-ref inputs "mesa") "/lib/libEGL.so'"))

Likewise (‘let’ form).

> +              (("find_library\\(\"X11\"\\)")
> +               (string-append "'" (assoc-ref inputs "libx11") "/lib/libX11.so'")))
> +            #t))

Phases don’t need to return #t once the ‘core-updates-frozen’ branch
gets merged, which should happen soon™.  :-)

> +        ;; tests fail with: Exception: (standalone) XOpenDisplay: cannot open display
> +        (delete 'check))))
> +   (inputs
> +    `(("libx11" ,libx11)
> +      ("mesa" ,mesa)))
> +   (home-page "https://github.com/moderngl/glcontext")
> +   (synopsis "Portable OpenGL Context for ModernGL")
> +   (description "Python-glcontext is a library providing OpenGL implementation
> +for ModernGL on multiple platforms.")

“providing an OpenGL implementation” (missing article).


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 04/12] gnu: Add python-moderngl.
  2021-09-10 11:24   ` [bug#50505] [PATCH 04/12] gnu: Add python-moderngl Daniel Meißner via Guix-patches via
@ 2021-09-11 19:46     ` Xinglu Chen
  0 siblings, 0 replies; 39+ messages in thread
From: Xinglu Chen @ 2021-09-11 19:46 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

[-- Attachment #1: Type: text/plain, Size: 1842 bytes --]

On Fri, Sep 10 2021, Daniel Meißner via Guix-patches via wrote:

> * gnu/packages/python-xyz.scm (python-moderngl): New variable.
> ---
>  gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index 251aad5b61..394f30226f 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -18930,6 +18930,33 @@ library.")
>  for ModernGL on multiple platforms.")
>     (license license:expat)))
>  
> +(define-public python-moderngl
> +  (package
> +    (name "python-moderngl")
> +    (version "5.6.4")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "moderngl" version))
> +       (sha256
> +        (base32
> +         "1ysinnyr3rkdisbihdrn1623l3rw45nx8p2j31dgffsykxah8vcc"))))
> +    (build-system python-build-system)
> +    (propagated-inputs
> +     `(("python-glcontext" ,python-glcontext)))
> +    (home-page
> +     "https://github.com/moderngl/moderngl")

Nit: no need for a newline  :-)

> +    (synopsis
> +     "Python wrapper for OpenGL")

Likewise.

> +    (description "ModernGL is a python wrapper over OpenGL 3.3+ core that
> +simplifies the creation of simple graphics applications like scientific
> +simulations, games or user interfaces.  Usually, acquiring in-depth knowledge
> +of OpenGL requires a steep learning curve.  In contrast, ModernGL is easy to
> +learn and use, moreover it is capable of rendering with high performance and
> +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-rencode
>    (package
>     (name "python-rencode")
> -- 
> 2.33.0

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 05/12] gnu: Add python-pyglet.
  2021-09-10 11:24   ` [bug#50505] [PATCH 05/12] gnu: Add python-pyglet Daniel Meißner via Guix-patches via
@ 2021-09-11 19:49     ` Xinglu Chen
  0 siblings, 0 replies; 39+ messages in thread
From: Xinglu Chen @ 2021-09-11 19:49 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

[-- Attachment #1: Type: text/plain, Size: 2659 bytes --]

On Fri, Sep 10 2021, Daniel Meißner via Guix-patches via wrote:

> * gnu/packages/python-xyz.scm (python-pyglet): New variable.
> ---
>  gnu/packages/python-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
>
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index 394f30226f..e1e676490b 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -18957,6 +18957,48 @@ 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
> +     '(;; tests fail with: TypeError: don't know how to make test from:
> +       ;; <pyglet._ModuleProxy object at ...>
> +       #:tests? #f
> +       #:phases (modify-phases %standard-phases

Nit: ‘modify-phase’ is usually on its own line.

> +                  (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\"")))
> +                      #t)))))

No need for trailing #t.

> +    (inputs
> +     `(("mesa" ,mesa)
> +       ("glu" ,glu)))
> +    (native-inputs `(("unzip" ,unzip)))
> +    (home-page
> +     "https://pyglet.readthedocs.io")

No need for a newline.

> +    (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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 06/12] gnu: Add python-multipledispatch.
  2021-09-10 11:24   ` [bug#50505] [PATCH 06/12] gnu: Add python-multipledispatch Daniel Meißner via Guix-patches via
@ 2021-09-11 19:52     ` Xinglu Chen
  0 siblings, 0 replies; 39+ messages in thread
From: Xinglu Chen @ 2021-09-11 19:52 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

[-- Attachment #1: Type: text/plain, Size: 1599 bytes --]

On Fri, Sep 10 2021, Daniel Meißner via Guix-patches via wrote:

> * gnu/packages/python-xyz.scm (python-multipledispatch): New variable.
> ---
>  gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index e1e676490b..0102dbc4bb 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -18957,6 +18957,26 @@ 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-multipledispatch
> +  (package
> +    (name "python-multipledispatch")
> +    (version "0.6.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "multipledispatch" version))
> +       (sha256
> +        (base32
> +         "1slblghfjg9fdi9zpd7gmrkvfbv20nrdgnrymcnbky8bzm8i9ax7"))))
> +    (build-system python-build-system)
> +    (propagated-inputs `(("python-six" ,python-six)))
> +    (home-page
> +     "https://github.com/mrocklin/multipledispatch/")

No need for a newline.

> +    (synopsis "Multiple dispatch library for Python")
> +    (description "This library defines a decorator that makes dispatching on
> +types more concise to write. ")
                               ^
Trailing whitespace; ‘guix lint’ should have caught this.  :-)

> +    (license license:bsd-3)))
> +
>  (define-public python-pyglet
>    (package
>      (name "python-pyglet")
> -- 
> 2.33.0

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 07/12] gnu: Add python-pyrr.
  2021-09-10 11:24   ` [bug#50505] [PATCH 07/12] gnu: Add python-pyrr Daniel Meißner via Guix-patches via
@ 2021-09-11 19:58     ` Xinglu Chen
  0 siblings, 0 replies; 39+ messages in thread
From: Xinglu Chen @ 2021-09-11 19:58 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

[-- Attachment #1: Type: text/plain, Size: 1969 bytes --]

On Fri, Sep 10 2021, Daniel Meißner via Guix-patches via wrote:

> * gnu/packages/python-xyz.scm (python-pyrr): New variable.
> ---
>  gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
>
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index 0102dbc4bb..eb0e67c98d 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -18977,6 +18977,31 @@ also written in C++ for high performance.")
>  types more concise to write. ")
>      (license license:bsd-3)))
>  
> +(define-public python-pyrr
> +  (package
> +    (name "python-pyrr")
> +    (version "0.10.3")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "pyrr" version))
> +       (sha256
> +        (base32
> +         "07byxkq8dcc8n6fc2q7g3vq3mxzzj0hqzm8hlq3gfwbf68h7n3rw"))))
> +    (build-system python-build-system)
> +    (propagated-inputs
> +     `(("python-multipledispatch" ,python-multipledispatch)
> +       ("python-numpy" ,python-numpy)))
> +    (home-page
> +     "https://github.com/adamlwgriffiths/Pyrr")

No need for a newline  :-)

> +    (synopsis
> +     "Mathematical functions for 3D graphics using NumPy")

Likewise.

> +    (description
> +     "A collection of object-oriented and procedural interfaces for working
> +with matrices, quaternions, vectors and plane/line/ray objects for 3D
> +graphics.")

The description should consist of one or more complete sentences, see
“16.4.4 Synopses and Descriptions” in the manual.  Maybe

  This Python package provides collection of object-oriented and
  procedural interfaces for working with matrices, quaternions, vectors
  and plane/line/ray objects for 3D graphics.

?
> +    (license license:bsd-3)))

The LICENSE file looks more like BSD-2.

> +
>  (define-public python-pyglet
>    (package
>      (name "python-pyglet")
> -- 
> 2.33.0

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 00/12] gnu: Add python-manim
  2021-09-10 14:40 ` [bug#50505] [PATCH 00/12] gnu: Add python-manim Liliana Marie Prikler
@ 2021-09-13 14:30   ` Daniel Meißner via Guix-patches via
  2021-09-13 14:46     ` Liliana Marie Prikler
  0 siblings, 1 reply; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-13 14:30 UTC (permalink / raw)
  To: Liliana Marie Prikler, 50505

Hi Liliana,

Liliana writes:
> For the tests that need DISPLAY, the usual thing we do here is to spawn
> an Xvfb for display :1 and set DISPLAY accordingly.  There are several
> variants depending on what exactly else you need (some with dbus, some
> without), simply grep for "xorg-server-for-tests" and you ought to find
> one that fits your needs.

Thanks for your advice, I was able to spawn an Xvfb for display :1 like
you suggested but apparently, the tests for python-manim want to create
some type of cache folder.  The tests now raise a different error:
`Failed to create //.cache for shader cache (Permission
denied)---disabling.' I have to investigate where this error message
comes from.  I suppose I have to set some environment variable.
Nevertheless, what would be an appriopiate writable location for the
cache?

> Once we find out the packages that fail regardless, that have no easy
> fix, it is still acceptable to fix a few failing tests manually by
> patching the test suite, or if all else fails use `#:tests? #f' with an
> appropriate comment.

Alright, thank you.  I will give the other tests another try.

Best Daniel




^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 00/12] gnu: Add python-manim
  2021-09-13 14:30   ` Daniel Meißner via Guix-patches via
@ 2021-09-13 14:46     ` Liliana Marie Prikler
  2021-09-13 14:49       ` Liliana Marie Prikler
  0 siblings, 1 reply; 39+ messages in thread
From: Liliana Marie Prikler @ 2021-09-13 14:46 UTC (permalink / raw)
  To: Daniel Meißner, 50505

Hi Daniel,

Am Montag, den 13.09.2021, 16:30 +0200 schrieb Daniel Meißner:
> Hi Liliana,
> 
> Liliana writes:
> > For the tests that need DISPLAY, the usual thing we do here is to
> > spawn an Xvfb for display :1 and set DISPLAY accordingly.  There
> > are several variants depending on what exactly else you need (some
> > with dbus, some without), simply grep for "xorg-server-for-tests"
> > and you ought to find one that fits your needs.
> 
> Thanks for your advice, I was able to spawn an Xvfb for display :1
> like you suggested but apparently, the tests for python-manim want to
> create some type of cache folder.  The tests now raise a different
> error: `Failed to create //.cache for shader cache (Permission
> denied)---disabling.' I have to investigate where this error message
> comes from.  I suppose I have to set some environment variable.
> Nevertheless, what would be an appriopiate writable location for the
> cache?
Normally, such tests want to write to $HOME/.cache.  I'm not sure why
HOME isn't homeless-shelter in this output, but setting HOME or
XDG_CACHE_HOME appropriately ought to resolve this one.

Regards,
Liliana





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 00/12] gnu: Add python-manim
  2021-09-13 14:46     ` Liliana Marie Prikler
@ 2021-09-13 14:49       ` Liliana Marie Prikler
  2021-09-15 14:32         ` Daniel Meißner via Guix-patches via
  0 siblings, 1 reply; 39+ messages in thread
From: Liliana Marie Prikler @ 2021-09-13 14:49 UTC (permalink / raw)
  To: Daniel Meißner, 50505

Am Montag, den 13.09.2021, 16:46 +0200 schrieb Liliana Marie Prikler:
> Hi Daniel,
> 
> Am Montag, den 13.09.2021, 16:30 +0200 schrieb Daniel Meißner:
> > Hi Liliana,
> > 
> > Liliana writes:
> > > For the tests that need DISPLAY, the usual thing we do here is to
> > > spawn an Xvfb for display :1 and set DISPLAY accordingly.  There
> > > are several variants depending on what exactly else you need
> > > (some with dbus, some without), simply grep for "xorg-server-for-
> > > tests" and you ought to find one that fits your needs.
> > 
> > Thanks for your advice, I was able to spawn an Xvfb for display :1
> > like you suggested but apparently, the tests for python-manim want
> > to create some type of cache folder.  The tests now raise a
> > different error: `Failed to create //.cache for shader cache
> > (Permission denied)---disabling.' I have to investigate where this
> > error message comes from.  I suppose I have to set some environment
> > variable. Nevertheless, what would be an appriopiate writable
> > location for the cache?
> Normally, such tests want to write to $HOME/.cache.  I'm not sure why
> HOME isn't homeless-shelter in this output, but setting HOME or
> XDG_CACHE_HOME appropriately ought to resolve this one.
Oops, forgot about the value, normally we do (setenv "HOME" (getcwd))
in the build directory, for XDG_CACHE_HOME that'd be (string-append
(getcwd) "/.cache").  If whatever creates this cache doesn't honour
XDG_CACHE_HOME, you'll have to find out which variable it honours or
potentially patch it.

Happy hacking!





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 00/12] gnu: Add python-manim
  2021-09-13 14:49       ` Liliana Marie Prikler
@ 2021-09-15 14:32         ` Daniel Meißner via Guix-patches via
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 14:32 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 50505

Hi Liliana,

Liliana writes:
> > Normally, such tests want to write to $HOME/.cache.  I'm not sure
> > why
> > HOME isn't homeless-shelter in this output, but setting HOME or
> > XDG_CACHE_HOME appropriately ought to resolve this one.
> Oops, forgot about the value, normally we do (setenv "HOME" (getcwd))
> in the build directory, for XDG_CACHE_HOME that'd be (string-append
> (getcwd) "/.cache").  If whatever creates this cache doesn't honour
> XDG_CACHE_HOME, you'll have to find out which variable it honours or
> potentially patch it.

I couldn't find the right variable to make this error message
disappear.  I am not even sure where the error message comes from.  It
appears somewhere during the check phase of python-pyglet.  However,
turned out that this error message was not responsible for the failing
tests and the tests now pass.

Best
Daniel






^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH 01/12] gnu: Add python-cloup.
  2021-09-11 19:33   ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Xinglu Chen
@ 2021-09-15 14:54     ` Daniel Meißner via Guix-patches via
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 14:54 UTC (permalink / raw)
  To: Xinglu Chen; +Cc: 50505

Hi Xinglu,

thanks for your thorough review and the fix :)  I will prepare a new
patchset implementing the comments.

Best
Daniel






^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH v2 00/13] Add python-manim
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
  2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
  2021-09-10 14:40 ` [bug#50505] [PATCH 00/12] gnu: Add python-manim Liliana Marie Prikler
@ 2021-09-15 15:25 ` Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 01/13] gnu: Add python-cloup Daniel Meißner via Guix-patches via
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 15:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner, Xinglu Chen, Liliana Marie Prikler

Hi!

The following patchset implements the suggestions by Xinglu and Liliana.

Main points:

* fix tests for all packages
  BUT: python-moderngl-window still has some failing tests
* Fix formatting as suggested by Xinglu Chen
* Fix dependencies of python-manim and python-pyglet

Open problems:

Some of the tests of python-moderngl-window fail during `guix build
--keep-failed python-moderngl-window'.  However, when changing into the build
directory and running `pytest tests' in a guix environment where the
dependencies are installed, the tests pass.  Any ideas?

The package python-manim has an optional LaTeX dependency to allow LaTeX
rendering of equations.  The docs[1] say that the full package list they use
is:

amsmath babel-english cbfonts-fd cm-super ctex doublestroke dvisvgm everysel
fontspec frcursive fundus-calligra gnu-freefont jknapltx latex-bin
mathastext microtype ms physics preview ragged2e relsize rsfs
setspace standalone tipa wasy wasysym xcolor xetex xkeyval

Since texlive is a relatively large package: What is the best way to deal with
this optional dependency?

1: https://docs.manim.community/en/stable/installation/linux.html#optional-dependencies

Daniel Meißner (13):
  gnu: Add python-cloup.
  gnu: Add python-cloup-0.7.
  gnu: Add python-glcontext.
  gnu: Add python-moderngl.
  gnu: Add python-pyglet.
  gnu: Add python-multipledispatch.
  gnu: Add python-pyrr.
  gnu: Add python-screeninfo.
  gnu: Add python-moderngl-window.
  gnu: Add python-manimpango.
  gnu: Add python-mapbox-earcut.
  gnu: Add python-screeninfo-0.6.
  gnu: Add python-manim 0.9.0.

 gnu/local.mk                                  |   3 +
 .../python-manimpango-remove-manim-dep.patch  | 172 +++++++++
 .../python-moderngl-window-skip-tests.patch   |  62 ++++
 gnu/packages/python-science.scm               |  93 +++++
 gnu/packages/python-xyz.scm                   | 341 ++++++++++++++++++
 5 files changed, 671 insertions(+)
 create mode 100644 gnu/packages/patches/python-manimpango-remove-manim-dep.patch
 create mode 100644 gnu/packages/patches/python-moderngl-window-skip-tests.patch

-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH v2 01/13] gnu: Add python-cloup.
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
                   ` (2 preceding siblings ...)
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 00/13] " Daniel Meißner via Guix-patches via
@ 2021-09-15 15:25 ` Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 02/13] gnu: Add python-cloup-0.7 Daniel Meißner via Guix-patches via
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 15:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner, Xinglu Chen

* gnu/packages/python-xyz.scm (python-cloup): New variable.

Co-authored-by: Xinglu Chen <public@yoctocell.xyz>
---
 gnu/packages/python-science.scm |  1 +
 gnu/packages/python-xyz.scm     | 35 +++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 738b504e3b..d3730fadcc 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2021 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e98eec19bc..202cf569d5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3308,6 +3308,41 @@ with sensible defaults out of the box.")
         (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
     (arguments `())))
 
+(define-public python-cloup
+  (package
+    (name "python-cloup")
+    (version "0.11.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "cloup" version))
+       (sha256
+        (base32
+         "07kxw81bml137w9bfmwkjbdzbldkk1k1lws82wffz9244pp7k8ib"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "-m" "pytest")))))))
+    (propagated-inputs
+     `(("python-click" ,python-click)))
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)
+       ("python-setuptools-scm" ,python-setuptools-scm/next)
+       ("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/janLuke/cloup")
+    (synopsis "Extension library for @code{python-click}")
+    (description
+     "Cloup---originally from ``Click + option groups''---enriches
+@code{python-click} with several features that make it more expressive and
+configurable: option groups, constraints, subcommand aliases, subcommands
+sections, and a themeable @code{HelpFormatter}.")
+    (license license:bsd-3)))
+
 (define-public python-vcversioner
   (package
     (name "python-vcversioner")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH v2 02/13] gnu: Add python-cloup-0.7.
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
                   ` (3 preceding siblings ...)
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 01/13] gnu: Add python-cloup Daniel Meißner via Guix-patches via
@ 2021-09-15 15:25 ` Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 03/13] gnu: Add python-glcontext Daniel Meißner via Guix-patches via
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 15:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-cloup-0.7): New variable.
---
 gnu/packages/python-xyz.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 202cf569d5..659a02e7e6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3343,6 +3343,18 @@ configurable: option groups, constraints, subcommand aliases, subcommands
 sections, and a themeable @code{HelpFormatter}.")
     (license license:bsd-3)))
 
+(define-public python-cloup-0.7
+  (package (inherit python-cloup)
+    (name "python-cloup-0.7")
+    (version "0.7.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "cloup" version))
+       (sha256
+        (base32
+         "0yyxibwlxmdkm4866fm4rwpdgy3d6y18n061992ckr54vl0cav7j"))))))
+
 (define-public python-vcversioner
   (package
     (name "python-vcversioner")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH v2 03/13] gnu: Add python-glcontext.
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
                   ` (4 preceding siblings ...)
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 02/13] gnu: Add python-cloup-0.7 Daniel Meißner via Guix-patches via
@ 2021-09-15 15:25 ` Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 04/13] gnu: Add python-moderngl Daniel Meißner via Guix-patches via
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 15:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-glcontext): 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 659a02e7e6..09df43b41d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18888,6 +18888,64 @@ library.")
     (description
      "This is the Cython-coded accelerator module for PyOpenGL.")))
 
+(define-public python-glcontext
+  (package
+   (name "python-glcontext")
+   (version "2.3.4")
+   (source
+    (origin
+     (method git-fetch)
+     (uri (git-reference
+           (url "https://github.com/moderngl/glcontext")
+           (commit version)))
+     (file-name (git-file-name name version))
+     (sha256
+      (base32
+       "1m2zkl696vqmgrd5k1c5kl0krk6qgjgsz88qhahwva0l40bswvhp"))))
+   (build-system python-build-system)
+   (arguments
+    '(#:phases
+      (modify-phases %standard-phases
+        (add-before 'build 'fix-lib-paths
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (let ((mesa (assoc-ref inputs "mesa"))
+                  (libx11 (assoc-ref inputs "libx11")))
+              (substitute* '("glcontext/x11.cpp" "glcontext/egl.cpp")
+                (("\"libGL.so\"")
+                 (string-append "\"" mesa  "/lib/libGL.so\""))
+                (("\"libEGL.so\"")
+                 (string-append "\"" mesa "/lib/libEGL.so\""))
+                (("\"libX11.so\"")
+                 (string-append "\"" libx11 "/lib/libX11.so\"")))
+              (substitute* '("glcontext/__init__.py")
+                (("find_library\\('GL'\\)")
+                 (string-append "'" mesa "/lib/libGL.so'"))
+                (("find_library\\('EGL'\\)")
+                 (string-append "'" mesa "/lib/libEGL.so'"))
+                (("find_library\\(\"X11\"\\)")
+                 (string-append "'" libx11 "/lib/libX11.so'"))))))
+        (add-before 'check 'prepare-x
+          (lambda _
+            (system "Xvfb :1 &")
+            (setenv "DISPLAY" ":1")))
+        (replace 'check
+          (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+            (when tests?
+              (add-installed-pythonpath inputs outputs)
+              (invoke "pytest" "tests")))))))
+   (inputs
+    `(("libx11" ,libx11)
+      ("mesa" ,mesa)))
+   (native-inputs
+    `(("xorg-server" ,xorg-server-for-tests)
+      ("python-pytest" ,python-pytest)
+      ("python-psutil" ,python-psutil)))
+   (home-page "https://github.com/moderngl/glcontext")
+   (synopsis "Portable OpenGL Context for ModernGL")
+   (description "Python-glcontext is a library providing an OpenGL
+implementation for ModernGL on multiple platforms.")
+   (license license:expat)))
+
 (define-public python-rencode
   (package
    (name "python-rencode")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH v2 04/13] gnu: Add python-moderngl.
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
                   ` (5 preceding siblings ...)
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 03/13] gnu: Add python-glcontext Daniel Meißner via Guix-patches via
@ 2021-09-15 15:25 ` Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 05/13] gnu: Add python-pyglet Daniel Meißner via Guix-patches via
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 15:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-moderngl): New variable.
---
 gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 09df43b41d..f10858d315 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18946,6 +18946,31 @@ library.")
 implementation for ModernGL on multiple platforms.")
    (license license:expat)))
 
+(define-public python-moderngl
+  (package
+    (name "python-moderngl")
+    (version "5.6.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "moderngl" version))
+       (sha256
+        (base32
+         "1ysinnyr3rkdisbihdrn1623l3rw45nx8p2j31dgffsykxah8vcc"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-glcontext" ,python-glcontext)))
+    (home-page "https://github.com/moderngl/moderngl")
+    (synopsis "Python wrapper for OpenGL")
+    (description "ModernGL is a python wrapper over OpenGL 3.3+ core that
+simplifies the creation of simple graphics applications like scientific
+simulations, games or user interfaces.  Usually, acquiring in-depth knowledge
+of OpenGL requires a steep learning curve.  In contrast, ModernGL is easy to
+learn and use, moreover it is capable of rendering with high performance and
+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-rencode
   (package
    (name "python-rencode")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH v2 05/13] gnu: Add python-pyglet.
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
                   ` (6 preceding siblings ...)
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 04/13] gnu: Add python-moderngl Daniel Meißner via Guix-patches via
@ 2021-09-15 15:25 ` Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 06/13] gnu: Add python-multipledispatch Daniel Meißner via Guix-patches via
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 15:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* 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





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH v2 06/13] gnu: Add python-multipledispatch.
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
                   ` (7 preceding siblings ...)
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 05/13] gnu: Add python-pyglet Daniel Meißner via Guix-patches via
@ 2021-09-15 15:25 ` Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 07/13] gnu: Add python-pyrr Daniel Meißner via Guix-patches via
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 15:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-multipledispatch): New variable.
---
 gnu/packages/python-xyz.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a48c228158..0f445e15bc 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18971,6 +18971,25 @@ 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-multipledispatch
+  (package
+    (name "python-multipledispatch")
+    (version "0.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "multipledispatch" version))
+       (sha256
+        (base32
+         "1slblghfjg9fdi9zpd7gmrkvfbv20nrdgnrymcnbky8bzm8i9ax7"))))
+    (build-system python-build-system)
+    (propagated-inputs `(("python-six" ,python-six)))
+    (home-page "https://github.com/mrocklin/multipledispatch/")
+    (synopsis "Multiple dispatch library for Python")
+    (description "This library defines a decorator that makes dispatching on
+types more concise to write.")
+    (license license:bsd-3)))
+
 (define-public python-pyglet
   (package
     (name "python-pyglet")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH v2 07/13] gnu: Add python-pyrr.
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
                   ` (8 preceding siblings ...)
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 06/13] gnu: Add python-multipledispatch Daniel Meißner via Guix-patches via
@ 2021-09-15 15:25 ` Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 08/13] gnu: Add python-screeninfo Daniel Meißner via Guix-patches via
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 15:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-pyrr): New variable.
---
 gnu/packages/python-xyz.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0f445e15bc..4fa193f47e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18990,6 +18990,29 @@ also written in C++ for high performance.")
 types more concise to write.")
     (license license:bsd-3)))
 
+(define-public python-pyrr
+  (package
+    (name "python-pyrr")
+    (version "0.10.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pyrr" version))
+       (sha256
+        (base32
+         "07byxkq8dcc8n6fc2q7g3vq3mxzzj0hqzm8hlq3gfwbf68h7n3rw"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-multipledispatch" ,python-multipledispatch)
+       ("python-numpy" ,python-numpy)))
+    (home-page "https://github.com/adamlwgriffiths/Pyrr")
+    (synopsis "Mathematical functions for 3D graphics using NumPy")
+    (description
+     "This Python package provides a collection of object-oriented and
+procedural interfaces for working with matrices, quaternions, vectors and
+plane/line/ray objects for 3D graphics.")
+    (license license:bsd-2)))
+
 (define-public python-pyglet
   (package
     (name "python-pyglet")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH v2 08/13] gnu: Add python-screeninfo.
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
                   ` (9 preceding siblings ...)
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 07/13] gnu: Add python-pyrr Daniel Meißner via Guix-patches via
@ 2021-09-15 15:25 ` Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 09/13] gnu: Add python-moderngl-window Daniel Meißner via Guix-patches via
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 15:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-screeninfo): New variable.
---
 gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4fa193f47e..3a984eaa68 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19071,6 +19071,28 @@ 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-screeninfo
+  (package
+   (name "python-screeninfo")
+   (version "0.7")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (pypi-uri "screeninfo" version))
+     (sha256
+      (base32
+       "007m7sqv30qak56885dxbijksrg2hd121hfpvg2llm734wspra8j"))))
+   (build-system python-build-system)
+   (native-inputs `(("python-pytest" ,python-pytest)))
+   (home-page "https://github.com/rr-/screeninfo")
+   (synopsis
+    "Obtain information about physical screens")
+   (description
+    "This python module provides means to access information about physical
+screens like resolution, height and width of the screen, connecting port
+etc.")
+   (license (list license:expat license:bsd-3))))
+
 (define-public python-rencode
   (package
    (name "python-rencode")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH v2 09/13] gnu: Add python-moderngl-window.
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
                   ` (10 preceding siblings ...)
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 08/13] gnu: Add python-screeninfo Daniel Meißner via Guix-patches via
@ 2021-09-15 15:25 ` Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 10/13] gnu: Add python-manimpango Daniel Meißner via Guix-patches via
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 15:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-xyz.scm (python-moderngl-window): New variable.
---
 gnu/local.mk                                  |  1 +
 .../python-moderngl-window-skip-tests.patch   | 62 +++++++++++++++++++
 gnu/packages/python-xyz.scm                   | 49 +++++++++++++++
 3 files changed, 112 insertions(+)
 create mode 100644 gnu/packages/patches/python-moderngl-window-skip-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 175e691a63..d738f97ca8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1648,6 +1648,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/python-libxml2-utf8.patch		\
   %D%/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch	\
   %D%/packages/patches/python-memcached-syntax-warnings.patch	\
+  %D%/packages/patches/python-moderngl-window-skip-tests.patch  \
   %D%/packages/patches/python-mox3-python3.6-compat.patch	\
   %D%/packages/patches/python-testtools.patch			\
   %D%/packages/patches/python-packaging-test-arch.patch		\
diff --git a/gnu/packages/patches/python-moderngl-window-skip-tests.patch b/gnu/packages/patches/python-moderngl-window-skip-tests.patch
new file mode 100644
index 0000000000..cbfefa6c3a
--- /dev/null
+++ b/gnu/packages/patches/python-moderngl-window-skip-tests.patch
@@ -0,0 +1,62 @@
+Skip tests for optional dependencies
+
+The Python packages pywavefront and trimesh are optional dependencies and not
+yet packaged in Guix but the tests try to load the modules anyway.  Therefore
+skip them.
+
+diff --git a/tests/test_docs.py b/tests/test_docs.py
+index e4a38df..99a2aa0 100644
+--- a/tests/test_docs.py
++++ b/tests/test_docs.py
+@@ -133,20 +133,11 @@ class TestCase(unittest.TestCase):
+ \r
+     # --- Loaders : Scene ---\r
+ \r
+-    def test_loaders_wavefront(self):\r
+-        self.validate('loaders/wavefront.rst', 'moderngl_window.loaders.scene.wavefront', 'Loader')\r
+-\r
+     def test_loaders_gltf(self):\r
+         self.validate('loaders/gltf2.rst', 'moderngl_window.loaders.scene.gltf2', 'Loader')\r
+ \r
+-    def test_loaders_stl(self):\r
+-        self.validate('loaders/wavefront.rst', 'moderngl_window.loaders.scene.stl', 'Loader')\r
+-\r
+     # --- Loaders : Program ---\r
+ \r
+-    def test_loader_single(self):\r
+-        self.validate('loaders/single.rst', 'moderngl_window.loaders.program.single', 'Loader')\r
+-\r
+     def test_loader_separate(self):\r
+         self.validate('loaders/separate.rst', 'moderngl_window.loaders.program.separate', 'Loader')\r
+ \r
+diff --git a/tests/test_loaders_scene.py b/tests/test_loaders_scene.py
+index c577315..2eef889 100644
+--- a/tests/test_loaders_scene.py
++++ b/tests/test_loaders_scene.py
+@@ -16,16 +16,6 @@ class SceneLoadersTestCase(HeadlessTestCase):
+     window_size = (16, 16)
+     aspect_ratio = 1.0
+ 
+-    def test_wavefront(self):
+-        """Load wavefront file"""
+-        scene = resources.scenes.load(SceneDescription(path='scenes/crate/crate.obj'))
+-        self.assertIsInstance(scene, Scene)
+-
+-    def test_wavefont_not_found(self):
+-        """Ensure ImproperlyConfigured is raised when wavefront is not found"""
+-        with self.assertRaises(ImproperlyConfigured):
+-            resources.scenes.load(SceneDescription(path='scenes/doesnotexist.obj'))
+-
+     def test_gltf(self):
+         """Load standard gltf"""
+         scene = resources.scenes.load(SceneDescription(path='scenes/BoxTextured/glTF/BoxTextured.gltf'))
+@@ -45,7 +35,3 @@ class SceneLoadersTestCase(HeadlessTestCase):
+         """Attempt to load nonexisting gltf"""
+         with self.assertRaises(ImproperlyConfigured):
+             resources.scenes.load(SceneDescription(path='scenes/doesnotexist.gltf'))
+-
+-    def test_stl(self):
+-        scene = resources.scenes.load(SceneDescription(path='scenes/uplink.stl'))
+-        self.assertIsInstance(scene, Scene)
+-- 
+2.33.0
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3a984eaa68..0d3efe2700 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19071,6 +19071,55 @@ 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-moderngl-window
+  (package
+   (name "python-moderngl-window")
+   (version "2.4.0")
+   (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://github.com/moderngl/moderngl-window")
+                  (commit version)))
+            (file-name (git-file-name name version))
+            (patches
+             (search-patches "python-moderngl-window-skip-tests.patch"))
+            (sha256
+             (base32
+              "1fvhm6ln3q5kl5m5q3gzfmx1kpyn054fhpcrgpqz8809dxi7pzcv"))))
+   (build-system python-build-system)
+   (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'prepare-x
+           (lambda _
+             (system "Xvfb :1 &")
+             (setenv "DISPLAY" ":1")))
+         (add-before 'check 'fix-test
+           (lambda _
+             (substitute* '("tests/test_windowconfig.py")
+               (("terrain_Vs.glsl") "terrain_vs.glsl"))))
+         (replace 'check
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (add-installed-pythonpath inputs outputs)
+             (invoke "pytest" "tests" ))))))
+   (propagated-inputs
+    `(("python-pillow" ,python-pillow)
+      ("python-pyrr" ,python-pyrr)
+      ("python-numpy" ,python-numpy)
+      ("python-moderngl" ,python-moderngl)
+      ("python-pyglet" ,python-pyglet)))
+   (native-inputs
+    `(("python-pytest" ,python-pytest)
+      ("xorg-server" ,xorg-server-for-tests)))
+   (home-page "https://github.com/moderngl/moderngl-window")
+   (synopsis "Cross-platform utility library for ModernGL")
+   (description "This ModernGL utility library simplifies window creation and
+resource loading.  You can create a window for ModernGL using pyglet, pygame,
+PySide2, GLFW, SDL2, PyQt5 or tkinter.  Events are unified into a single event
+system.  Resource loading includes loading of 2D textures/texture arrays,
+shaders and objects/scenes.")
+   (license license:expat)))
+
 (define-public python-screeninfo
   (package
    (name "python-screeninfo")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH v2 10/13] gnu: Add python-manimpango.
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
                   ` (11 preceding siblings ...)
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 09/13] gnu: Add python-moderngl-window Daniel Meißner via Guix-patches via
@ 2021-09-15 15:25 ` Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 11/13] gnu: Add python-mapbox-earcut Daniel Meißner via Guix-patches via
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 15:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-science.scm (python-manimpango): New variable.
---
 gnu/local.mk                                  |   2 +
 .../python-manimpango-remove-manim-dep.patch  | 172 ++++++++++++++++++
 gnu/packages/python-science.scm               |  28 +++
 3 files changed, 202 insertions(+)
 create mode 100644 gnu/packages/patches/python-manimpango-remove-manim-dep.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index d738f97ca8..640b9e3b95 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -44,6 +44,7 @@
 # Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
 # Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
 # Copyright © 2021 Dmitry Polyakov <polyakov@liltechdude.xyz>
+# Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
 #
 # This file is part of GNU Guix.
 #
@@ -1646,6 +1647,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/python-pyfakefs-remove-bad-test.patch	\
   %D%/packages/patches/python-flint-includes.patch		\
   %D%/packages/patches/python-libxml2-utf8.patch		\
+  %D%/packages/patches/python-manimpango-remove-manim-dep.patch \
   %D%/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch	\
   %D%/packages/patches/python-memcached-syntax-warnings.patch	\
   %D%/packages/patches/python-moderngl-window-skip-tests.patch  \
diff --git a/gnu/packages/patches/python-manimpango-remove-manim-dep.patch b/gnu/packages/patches/python-manimpango-remove-manim-dep.patch
new file mode 100644
index 0000000000..579c2302d8
--- /dev/null
+++ b/gnu/packages/patches/python-manimpango-remove-manim-dep.patch
@@ -0,0 +1,172 @@
+Fix dependency on manim for tests
+
+This fixes a circular dependency between manim and manimpango.
+
+Extracted from upstream:
+https://github.com/ManimCommunity/ManimPango/commit/7e2b17aa14b10bd58af0598cc2de51a406682797
+
+diff --git a/tests/_manim.py b/tests/_manim.py
+index 3ea4676..b11d3e9 100644
+--- a/tests/_manim.py
++++ b/tests/_manim.py
+@@ -2,11 +2,12 @@
+ """This file contains helpers for the tests copied and modified
+ from Manim.
+ """
+-
++import copy
+ import os
++import re
+ from pathlib import Path
+
+-from manimpango import Alignment, MarkupUtils
++from manimpango import Alignment, MarkupUtils, TextSetting, text2svg
+
+
+ class MarkupText:
+@@ -104,3 +105,115 @@ class MarkupText:
+
+     def __repr__(self):
+         return f"MarkupText({repr(self.original_text)})"
++
++
++class Text:
++    def __init__(
++        self,
++        text: str,
++        fill_opacity: float = 1.0,
++        stroke_width: int = 0,
++        size: int = 1,
++        line_spacing: int = -1,
++        font: str = "",
++        slant: str = "NORMAL",
++        weight: str = "NORMAL",
++        gradient: tuple = None,
++        tab_width: int = 4,
++        disable_ligatures: bool = False,
++        filename: str = "text.svg",
++        **kwargs,
++    ) -> None:
++        self.size = size
++        self.filename = filename
++        self.line_spacing = line_spacing
++        self.font = font
++        self.slant = slant
++        self.weight = weight
++        self.gradient = gradient
++        self.tab_width = tab_width
++        self.original_text = text
++        self.disable_ligatures = disable_ligatures
++        text_without_tabs = text
++        self.t2f = self.t2s = self.t2w = {}
++        if text.find("\t") != -1:
++            text_without_tabs = text.replace("\t", " " * self.tab_width)
++        self.text = text_without_tabs
++        if self.line_spacing == -1:
++            self.line_spacing = self.size + self.size * 0.3
++        else:
++            self.line_spacing = self.size + self.size * self.line_spacing
++        self.text2svg()
++
++    def text2settings(self):
++        """Internally used function. Converts the texts and styles
++        to a setting for parsing."""
++        settings = []
++        t2x = [self.t2f, self.t2s, self.t2w]
++        for i in range(len(t2x)):
++            fsw = [self.font, self.slant, self.weight]
++            if t2x[i]:
++                for word, x in list(t2x[i].items()):
++                    for start, end in self.find_indexes(word, self.text):
++                        fsw[i] = x
++                        settings.append(TextSetting(start, end, *fsw))
++        # Set all text settings (default font, slant, weight)
++        fsw = [self.font, self.slant, self.weight]
++        settings.sort(key=lambda setting: setting.start)
++        temp_settings = settings.copy()
++        start = 0
++        for setting in settings:
++            if setting.start != start:
++                temp_settings.append(TextSetting(start, setting.start, *fsw))
++            start = setting.end
++        if start != len(self.text):
++            temp_settings.append(TextSetting(start, len(self.text), *fsw))
++        settings = sorted(temp_settings, key=lambda setting: setting.start)
++
++        if re.search(r"\n", self.text):
++            line_num = 0
++            for start, end in self.find_indexes("\n", self.text):
++                for setting in settings:
++                    if setting.line_num == -1:
++                        setting.line_num = line_num
++                    if start < setting.end:
++                        line_num += 1
++                        new_setting = copy.copy(setting)
++                        setting.end = end
++                        new_setting.start = end
++                        new_setting.line_num = line_num
++                        settings.append(new_setting)
++                        settings.sort(key=lambda setting: setting.start)
++                        break
++        for setting in settings:
++            if setting.line_num == -1:
++                setting.line_num = 0
++        return settings
++
++    def text2svg(self):
++        """Internally used function.
++        Convert the text to SVG using Pango
++        """
++        size = self.size * 10
++        line_spacing = self.line_spacing * 10
++        dir_name = Path(self.filename).parent
++        disable_liga = self.disable_ligatures
++        if not os.path.exists(dir_name):
++            os.makedirs(dir_name)
++        file_name = self.filename
++        settings = self.text2settings()
++        width = 600
++        height = 400
++
++        return text2svg(
++            settings,
++            size,
++            line_spacing,
++            disable_liga,
++            file_name,
++            30,
++            30,
++            width,
++            height,
++            self.text,
++        )
+diff --git a/tests/test_fonts.py b/tests/test_fonts.py
+index 51e7eb4..da42895 100644
+--- a/tests/test_fonts.py
++++ b/tests/test_fonts.py
+@@ -3,13 +3,12 @@ import sys
+ from pathlib import Path
+ from shutil import copyfile
+
+-import manim
+ import pytest
+
+ import manimpango
+
+ from . import FONT_DIR
+-from ._manim import MarkupText
++from ._manim import MarkupText, Text
+
+ font_lists = {
+     (FONT_DIR / "AdobeVFPrototype.ttf").absolute(): "Adobe Variable Font Prototype",
+@@ -38,7 +37,7 @@ def test_register_font(font_name):
+ @pytest.mark.parametrize("font_name", font_lists.values())
+ def test_warning(capfd, font_name):
+     print(font_name)
+-    manim.Text("Testing", font=font_name)
++    Text("Testing", font=font_name)
+     captured = capfd.readouterr()
+     assert "Pango-WARNING **" not in captured.err, "Looks like pango raised a warning?"
+
+--
+2.32.0
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index d3730fadcc..fcd983520c 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -38,6 +38,7 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages image-processing)
   #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages maths)
@@ -982,3 +983,30 @@ pandas notebooks, scripts, and libraries.  Unlike other distributed DataFrame
 libraries, Modin provides seamless integration and compatibility with existing
 pandas code.")
     (license license:asl2.0)))
+
+(define-public python-manimpango
+  (package
+    (name "python-manimpango")
+    (version "0.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ManimPango" version))
+       (sha256
+        (base32
+         "1j2mbhf7d82718nkc0r8x7cf35hlh13b67qkczjbbys3w24nyfsw"))
+       (patches (search-patches "python-manimpango-remove-manim-dep.patch"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("Cython" ,python-cython)
+       ("python-pytest" ,python-pytest)))
+    (inputs
+     `(("pango" ,pango)))
+    (home-page "https://manimpango.manim.community/")
+    (synopsis
+     "Bindings for pango for use with Manim")
+    (description
+     "These are Python bindings for Pango to be used with the mathematical
+animation software Manim.")
+    (license license:gpl3+)))
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH v2 11/13] gnu: Add python-mapbox-earcut.
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
                   ` (12 preceding siblings ...)
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 10/13] gnu: Add python-manimpango Daniel Meißner via Guix-patches via
@ 2021-09-15 15:25 ` Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 12/13] gnu: Add python-screeninfo-0.6 Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 13/13] gnu: Add python-manim 0.9.0 Daniel Meißner via Guix-patches via
  15 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 15:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-science.scm (python-mapbox-earcut): New variable.
---
 gnu/packages/python-xyz.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0d3efe2700..c5163d93a3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19120,6 +19120,35 @@ system.  Resource loading includes loading of 2D textures/texture arrays,
 shaders and objects/scenes.")
    (license license:expat)))
 
+(define-public python-mapbox-earcut
+  (package
+    (name "python-mapbox-earcut")
+    (version "0.12.10")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "mapbox_earcut" version))
+       (sha256
+        (base32
+         "0ly48lijgd9inq07x42pfp9c24fn16vn9axpmfwqrkn979krbnah"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-numpy" ,python-numpy)))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-wheel" ,python-wheel)
+       ("setuptools-scm" ,python-setuptools-scm)
+       ("cmake" ,cmake)))
+    (home-page
+     "https://github.com/skogler/mapbox_earcut_python")
+    (synopsis
+     "Python bindings for the Mapbox Earcut C++ polygon triangulation library")
+    (description
+     "The Mapbox Earcut library is a header-only C++ library which provides a
+fast and robust triangulation of 2D polygons.  This package provides Python
+bindings for this library.")
+    (license license:isc)))
+
 (define-public python-screeninfo
   (package
    (name "python-screeninfo")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH v2 12/13] gnu: Add python-screeninfo-0.6.
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
                   ` (13 preceding siblings ...)
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 11/13] gnu: Add python-mapbox-earcut Daniel Meißner via Guix-patches via
@ 2021-09-15 15:25 ` Daniel Meißner via Guix-patches via
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 13/13] gnu: Add python-manim 0.9.0 Daniel Meißner via Guix-patches via
  15 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 15:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

*  (python-screeninfo-0.6): New variable.
---
 gnu/packages/python-xyz.scm | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c5163d93a3..592e41f057 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19149,17 +19149,17 @@ fast and robust triangulation of 2D polygons.  This package provides Python
 bindings for this library.")
     (license license:isc)))
 
-(define-public python-screeninfo
+(define-public python-screeninfo-0.6
   (package
    (name "python-screeninfo")
-   (version "0.7")
+   (version "0.6.7")
    (source
     (origin
      (method url-fetch)
      (uri (pypi-uri "screeninfo" version))
      (sha256
       (base32
-       "007m7sqv30qak56885dxbijksrg2hd121hfpvg2llm734wspra8j"))))
+       "1jv9m9xhl7zr2hzfx0w5zyw9pajn4b4zpln4rdl3zni9lcfaqjqw"))))
    (build-system python-build-system)
    (native-inputs `(("python-pytest" ,python-pytest)))
    (home-page "https://github.com/rr-/screeninfo")
@@ -19171,6 +19171,17 @@ screens like resolution, height and width of the screen, connecting port
 etc.")
    (license (list license:expat license:bsd-3))))
 
+(define-public python-screeninfo
+  (package/inherit python-screeninfo-0.6
+    (version "0.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "screeninfo" version))
+       (sha256
+        (base32
+         "007m7sqv30qak56885dxbijksrg2hd121hfpvg2llm734wspra8j"))))))
+
 (define-public python-rencode
   (package
    (name "python-rencode")
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

* [bug#50505] [PATCH v2 13/13] gnu: Add python-manim 0.9.0.
  2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
                   ` (14 preceding siblings ...)
  2021-09-15 15:25 ` [bug#50505] [PATCH v2 12/13] gnu: Add python-screeninfo-0.6 Daniel Meißner via Guix-patches via
@ 2021-09-15 15:25 ` Daniel Meißner via Guix-patches via
  15 siblings, 0 replies; 39+ messages in thread
From: Daniel Meißner via Guix-patches via @ 2021-09-15 15:25 UTC (permalink / raw)
  To: 50505; +Cc: Daniel Meißner

* gnu/packages/python-science.scm (python-manim): New variable.
---
 gnu/packages/python-science.scm | 64 +++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index fcd983520c..df105d5103 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -36,6 +36,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gtk)
@@ -55,6 +56,7 @@
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages statistics)
   #:use-module (gnu packages time)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -1010,3 +1012,65 @@ pandas code.")
      "These are Python bindings for Pango to be used with the mathematical
 animation software Manim.")
     (license license:gpl3+)))
+
+(define-public python-manim
+  (package
+    (name "python-manim")
+    (version "0.9.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "manim" version))
+       (sha256
+        (base32
+         "0ksp57wcy45xkjips5i4wwm690mhbs2dmlcgsbmiwx78mfk4z0r3"))))
+    (build-system python-build-system)
+    (arguments '(#:phases
+                 (modify-phases %standard-phases
+                   (add-before 'build 'fix-ffmpeg-path
+                     (lambda* (#:key inputs outputs #:allow-other-keys)
+                       (substitute* '("manim/constants.py")
+                         (("FFMPEG_BIN: str = \"ffmpeg\"")
+                          (string-append "FFMPEG_BIN: str = \""
+                                         (assoc-ref inputs "ffmpeg")
+                                         "/bin/ffmpeg\"")))))
+                   ;; PyPI package contains no tests for manim but the
+                   ;; setup.py test command fails, so remove it
+                   (delete 'check))))
+    (propagated-inputs
+     `(("python-click" ,python-click)
+       ("python-click-default-group"
+        ,python-click-default-group)
+       ("python-cloup" ,python-cloup-0.7)
+       ("python-colour" ,python-colour)
+       ("python-decorator" ,python-decorator)
+       ("python-manimpango" ,python-manimpango)
+       ("python-mapbox-earcut" ,python-mapbox-earcut)
+       ("python-moderngl" ,python-moderngl)
+       ("python-moderngl-window"
+        ,python-moderngl-window)
+       ("python-networkx" ,python-networkx)
+       ("python-numpy" ,python-numpy)
+       ("python-pillow" ,python-pillow)
+       ("python-pycairo" ,python-pycairo)
+       ("python-pydub" ,python-pydub)
+       ("python-pygments" ,python-pygments)
+       ("python-requests" ,python-requests)
+       ("python-rich" ,python-rich)
+       ("python-scipy" ,python-scipy)
+       ("python-screeninfo" ,python-screeninfo-0.6)
+       ("python-tqdm" ,python-tqdm)
+       ("python-watchdog" ,python-watchdog)))
+    (inputs
+     `(("ffmpeg" ,ffmpeg)))
+    (native-inputs
+     `(("python-wheel" ,python-wheel)))
+    (home-page "https://www.manim.community/")
+    (synopsis
+     "Python animation engine for explanatory math videos")
+    (description
+     "Manim is a Python library for creating mathematical animations.  The
+animations are written as Python code which is based on predefined objects.
+You can make animations with maths formulas (LaTeX-based), simple shapes, 3D
+objects, function graphs and more.")
+    (license license:expat)))
-- 
2.33.0





^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2021-09-15 15:29 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10 11:22 [bug#50505] [PATCH 00/12] gnu: Add python-manim Daniel Meißner via Guix-patches via
2021-09-10 11:24 ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Daniel Meißner via Guix-patches via
2021-09-10 11:24   ` [bug#50505] [PATCH 02/12] gnu: Add python-cloup-0.7 Daniel Meißner via Guix-patches via
2021-09-10 11:24   ` [bug#50505] [PATCH 03/12] gnu: Add python-glcontext Daniel Meißner via Guix-patches via
2021-09-11 19:42     ` Xinglu Chen
2021-09-10 11:24   ` [bug#50505] [PATCH 04/12] gnu: Add python-moderngl Daniel Meißner via Guix-patches via
2021-09-11 19:46     ` Xinglu Chen
2021-09-10 11:24   ` [bug#50505] [PATCH 05/12] gnu: Add python-pyglet Daniel Meißner via Guix-patches via
2021-09-11 19:49     ` Xinglu Chen
2021-09-10 11:24   ` [bug#50505] [PATCH 06/12] gnu: Add python-multipledispatch Daniel Meißner via Guix-patches via
2021-09-11 19:52     ` Xinglu Chen
2021-09-10 11:24   ` [bug#50505] [PATCH 07/12] gnu: Add python-pyrr Daniel Meißner via Guix-patches via
2021-09-11 19:58     ` Xinglu Chen
2021-09-10 11:24   ` [bug#50505] [PATCH 08/12] gnu: Add python-screeninfo Daniel Meißner via Guix-patches via
2021-09-10 11:24   ` [bug#50505] [PATCH 09/12] gnu: Add python-moderngl-window Daniel Meißner via Guix-patches via
2021-09-10 11:25   ` [bug#50505] [PATCH 10/12] gnu: Add python-manimpango Daniel Meißner via Guix-patches via
2021-09-10 11:25   ` [bug#50505] [PATCH 11/12] gnu: Add python-mapbox-earcut Daniel Meißner via Guix-patches via
2021-09-10 11:25   ` [bug#50505] [PATCH 12/12] gnu: Add python-manim 0.9.0 Daniel Meißner via Guix-patches via
2021-09-11 19:33   ` [bug#50505] [PATCH 01/12] gnu: Add python-cloup Xinglu Chen
2021-09-15 14:54     ` Daniel Meißner via Guix-patches via
2021-09-10 14:40 ` [bug#50505] [PATCH 00/12] gnu: Add python-manim Liliana Marie Prikler
2021-09-13 14:30   ` Daniel Meißner via Guix-patches via
2021-09-13 14:46     ` Liliana Marie Prikler
2021-09-13 14:49       ` Liliana Marie Prikler
2021-09-15 14:32         ` Daniel Meißner via Guix-patches via
2021-09-15 15:25 ` [bug#50505] [PATCH v2 00/13] " Daniel Meißner via Guix-patches via
2021-09-15 15:25 ` [bug#50505] [PATCH v2 01/13] gnu: Add python-cloup Daniel Meißner via Guix-patches via
2021-09-15 15:25 ` [bug#50505] [PATCH v2 02/13] gnu: Add python-cloup-0.7 Daniel Meißner via Guix-patches via
2021-09-15 15:25 ` [bug#50505] [PATCH v2 03/13] gnu: Add python-glcontext Daniel Meißner via Guix-patches via
2021-09-15 15:25 ` [bug#50505] [PATCH v2 04/13] gnu: Add python-moderngl Daniel Meißner via Guix-patches via
2021-09-15 15:25 ` [bug#50505] [PATCH v2 05/13] gnu: Add python-pyglet Daniel Meißner via Guix-patches via
2021-09-15 15:25 ` [bug#50505] [PATCH v2 06/13] gnu: Add python-multipledispatch Daniel Meißner via Guix-patches via
2021-09-15 15:25 ` [bug#50505] [PATCH v2 07/13] gnu: Add python-pyrr Daniel Meißner via Guix-patches via
2021-09-15 15:25 ` [bug#50505] [PATCH v2 08/13] gnu: Add python-screeninfo Daniel Meißner via Guix-patches via
2021-09-15 15:25 ` [bug#50505] [PATCH v2 09/13] gnu: Add python-moderngl-window Daniel Meißner via Guix-patches via
2021-09-15 15:25 ` [bug#50505] [PATCH v2 10/13] gnu: Add python-manimpango Daniel Meißner via Guix-patches via
2021-09-15 15:25 ` [bug#50505] [PATCH v2 11/13] gnu: Add python-mapbox-earcut Daniel Meißner via Guix-patches via
2021-09-15 15:25 ` [bug#50505] [PATCH v2 12/13] gnu: Add python-screeninfo-0.6 Daniel Meißner via Guix-patches via
2021-09-15 15:25 ` [bug#50505] [PATCH v2 13/13] gnu: Add python-manim 0.9.0 Daniel Meißner via Guix-patches via

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).