Message ID | 20201029090929.10508-1-tanguy@bioneland.org |
---|---|
State | Accepted |
Headers | show |
Series | [bug#44275,v2] gnu: Add python-pydub. | expand |
Context | Check | Description |
---|---|---|
cbaines/submitting builds | success | |
cbaines/issue | success | View issue |
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
On Thu, Oct 29, 2020 at 10:09:29AM +0100, Tanguy Le Carrour wrote: > * gnu/packages/python-xyz.scm (python-pydub): New variable. Thanks! Pushed as 96767739a1d2222ed802dd5dcfa2bda1df85df77 > + (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)))))) This solution is more correct than the one I suggested. Thanks! > + (home-page "http://pydub.com") I made this use HTTPS. > + (synopsis "Manipulate audio with an simple and easy high level interface") > + (description > + "@code{pydub} makes it easy to manipulate audio. It relies on > +@code{ffmpeg} to open various audio formats.") And I tweaked these to avoid so-called "marketing language" and to clarify that pydub is in Python, which I think can be useful when searching for packages.
Hi, Le 30 octobre 2020 21:40:47 CET, Leo Famulari <leo@famulari.name> a écrit : >On Thu, Oct 29, 2020 at 10:09:29AM +0100, Tanguy Le Carrour wrote: >> * gnu/packages/python-xyz.scm (python-pydub): New variable. > >Thanks! Pushed as 96767739a1d2222ed802dd5dcfa2bda1df85df77 > >> + (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)))))) > >This solution is more correct than the one I suggested. Thanks! > >> + (home-page "http://pydub.com") > >I made this use HTTPS. > >> + (synopsis "Manipulate audio with an simple and easy high level >interface") >> + (description >> + "@code{pydub} makes it easy to manipulate audio. It relies on >> +@code{ffmpeg} to open various audio formats.") > >And I tweaked these to avoid so-called "marketing language" and to >clarify that pydub is in Python, which I think can be useful when >searching for packages. Thanks!
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 9f689d35b5..e938081d28 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 "http://pydub.com") + (inputs + `(("ffmpeg" ,ffmpeg))) + (propagated-inputs + `(("python-scipy" ,python-scipy))) + (synopsis "Manipulate audio with an simple and easy high level interface") + (description + "@code{pydub} makes it easy to manipulate audio. It relies on +@code{ffmpeg} to open various audio formats.") + (license license:expat))) ; MIT license + (define-public python-tqdm (package (name "python-tqdm")