diff options
author | Tanguy Le Carrour <tanguy@bioneland.org> | 2020-10-29 10:09:29 +0100 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2020-10-30 16:37:58 -0400 |
commit | 96767739a1d2222ed802dd5dcfa2bda1df85df77 (patch) | |
tree | 67d151d79a46d799108b761e276f7d716ce181be /gnu | |
parent | 94c38d54c9f061ffa0ccfe4be498c8e1b3c2a709 (diff) | |
download | guix-96767739a1d2222ed802dd5dcfa2bda1df85df77.tar.gz |
gnu: Add python-pydub.
* gnu/packages/python-xyz.scm (python-pydub): New variable. Signed-off-by: Leo Famulari <leo@famulari.name>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/python-xyz.scm | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index cd8ee24cbf..a0779532a2 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") |