Message ID | 20201028085654.18295-1-tanguy@bioneland.org |
---|---|
State | Accepted |
Headers | show |
Series | [bug#44275] 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 Wed, Oct 28, 2020 at 09:56:54AM +0100, Tanguy Le Carrour wrote: > * gnu/packages/python-xyz.scm (python-pydub): New variable. > + (propagated-inputs > + `(("ffmpeg" ,ffmpeg) > + ("python-scipy" ,python-scipy))) It would be good if store references to these programs could be "baked in" to the pydub code, rather than propagated. Can you take a look at how they are called and see if that is feasible? Often there is only one location that must be patched.
Hi Leo, Thanks for taking the time to review this! Le 10/28, Leo Famulari a écrit : > On Wed, Oct 28, 2020 at 09:56:54AM +0100, Tanguy Le Carrour wrote: > > * gnu/packages/python-xyz.scm (python-pydub): New variable. > > > + (propagated-inputs > > + `(("ffmpeg" ,ffmpeg) > > + ("python-scipy" ,python-scipy))) > > It would be good if store references to these programs could be "baked in" to > the pydub code, rather than propagated. Can you take a look at how they > are called and see if that is feasible? Often there is only one location > that must be patched. mmm… haven't done that so far, it would be my first time! Always good to learn new tricks! :-) I'll try to patch the call to `ffmpeg` and let you know. `python-scipy` is a different problem, though. This module is not listed as a requirement, but… it's required at run time. Event if I don't see the point of having SciPy loaded when you want to manipulate audio. But that's a different matter! Regards,
On Thu, Oct 29, 2020 at 09:26:57AM +0100, Tanguy Le Carrour wrote: > Hi Leo, > > Thanks for taking the time to review this! > > Le 10/28, Leo Famulari a écrit : > > On Wed, Oct 28, 2020 at 09:56:54AM +0100, Tanguy Le Carrour wrote: > > > * gnu/packages/python-xyz.scm (python-pydub): New variable. > > > > > + (propagated-inputs > > > + `(("ffmpeg" ,ffmpeg) > > > + ("python-scipy" ,python-scipy))) > > > > It would be good if store references to these programs could be "baked in" to > > the pydub code, rather than propagated. Can you take a look at how they > > are called and see if that is feasible? Often there is only one location > > that must be patched. > > mmm… haven't done that so far, it would be my first time! Always good to > learn new tricks! :-) > I'll try to patch the call to `ffmpeg` and let you know. > > `python-scipy` is a different problem, though. This module is not listed > as a requirement, but… it's required at run time. Event if I don't see the > point of having SciPy loaded when you want to manipulate audio. But that's > a different matter! Okay, I will take a look at the scipy thing today.
Le 10/29, Leo Famulari a écrit : > On Thu, Oct 29, 2020 at 09:26:57AM +0100, Tanguy Le Carrour wrote: > > […] > > > It would be good if store references to these programs could be "baked in" to > > > the pydub code, rather than propagated. Can you take a look at how they > > > are called and see if that is feasible? Often there is only one location > > > that must be patched. > > […] > > `python-scipy` is a different problem, though. This module is not listed > > as a requirement, but… it's required at run time. Event if I don't see the > > point of having SciPy loaded when you want to manipulate audio. But that's > > a different matter! > > Okay, I will take a look at the scipy thing today. Great, thanks! If it was up to me, I would remove altogether everything that is related to `scipy`, meaning the `pydub/scipy_effects.py` file. But it wouldn't be the same software any more, would it? ^_^' Regards,
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 6c5ccac647..55580a251b 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -16659,6 +16659,28 @@ 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) + (home-page "http://pydub.com") + (propagated-inputs + `(("ffmpeg" ,ffmpeg) + ("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")