diff mbox series

[bug#50505,v3,12/12] gnu: Add python-manim 0.9.0.

Message ID 20220101235155.5754-13-daniel.meissner-i4k@ruhr-uni-bochum.de
State New
Headers show
Series Add python-manim and its missing dependencies | expand

Commit Message

Daniel Meißner Jan. 1, 2022, 11:51 p.m. UTC
* gnu/packages/python-science.scm (python-manim): New variable.
---
 gnu/packages/python-science.scm | 61 +++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

Comments

Liliana Marie Prikler Jan. 2, 2022, 12:52 a.m. UTC | #1
Am Sonntag, dem 02.01.2022 um 00:51 +0100 schrieb Daniel Meißner:

> +                   ;; PyPI package contains no tests for manim but
> the
> +                   ;; setup.py test command fails, so remove it
> +                   (delete 'check))))
Use #:tests? #f then, either with the same comment or a shortened one.
diff mbox series

Patch

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 61628ec956..ce451a3d28 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -37,6 +37,7 @@  (define-module (gnu packages python-science)
   #: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)
@@ -56,6 +57,7 @@  (define-module (gnu packages python-science)
   #: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)
@@ -1063,3 +1065,62 @@  (define-public python-manimpango
      "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 = \""
+                                         (search-input-file inputs "/bin/ffmpeg"))))))
+                   ;; PyPI package contains no tests for manim but the
+                   ;; setup.py test command fails, so remove it
+                   (delete 'check))))
+    (propagated-inputs
+     (list python-click
+           python-click-default-group
+           python-cloup-0.7
+           python-colour
+           python-decorator
+           python-manimpango
+           python-mapbox-earcut
+           python-moderngl
+           python-moderngl-window
+           python-networkx
+           python-numpy
+           python-pillow
+           python-pycairo
+           python-pydub
+           python-pygments
+           python-requests
+           python-rich
+           python-scipy
+           python-screeninfo-0.6
+           python-tqdm
+           python-watchdog))
+    (inputs
+     (list ffmpeg))
+    (native-inputs
+     (list 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)))