guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: Add python-pydub.


From: guix-commits
Subject: branch master updated: gnu: Add python-pydub.
Date: Fri, 30 Oct 2020 16:38:45 -0400

This is an automated email from the git hooks/post-receive script.

lfam pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 9676773  gnu: Add python-pydub.
9676773 is described below

commit 96767739a1d2222ed802dd5dcfa2bda1df85df77
Author: Tanguy Le Carrour <tanguy@bioneland.org>
AuthorDate: Thu Oct 29 10:09:29 2020 +0100

    gnu: Add python-pydub.
    
    * gnu/packages/python-xyz.scm (python-pydub): New variable.
    
    Signed-off-by: Leo Famulari <leo@famulari.name>
---
 gnu/packages/python-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index cd8ee24..a077953 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16683,6 +16683,44 @@ ignoring formatting changes.")
 (define-public python2-pydiff
   (package-with-python2 python-pydiff))
 
+(define-public python-pydub
+  (package
+    (name "python-pydub")
+    (version "0.24.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pydub" version))
+       (sha256
+        (base32
+         "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-ffmpeg-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
+               (substitute* '("pydub/utils.py")
+                 (("return \"ffmpeg\"")
+                  (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
+                 (("return \"ffplay\"")
+                  (string-append "return \"" ffmpeg "/bin/ffplay\""))
+                 (("return \"ffprobe\"")
+                  (string-append "return \"" ffmpeg "/bin/ffprobe\""))
+                 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
+               #t))))))
+    (home-page "https://pydub.com";)
+    (inputs
+     `(("ffmpeg" ,ffmpeg)))
+    (propagated-inputs
+     `(("python-scipy" ,python-scipy)))
+    (synopsis "Manipulate audio with a high level interface in Python")
+    (description
+     "@code{pydub} makes it easy to manipulate audio in Python.  It relies on
+@code{ffmpeg} to open various audio formats.")
+    (license license:expat))) ; MIT license
+
 (define-public python-tqdm
   (package
     (name "python-tqdm")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]