From: Tanguy Le Carrour <tanguy@bioneland.org>
To: Leo Famulari <leo@famulari.name>
Cc: 44275@debbugs.gnu.org
Subject: [bug#44275] [PATCH] gnu: Add python-pydub.
Date: Fri, 30 Oct 2020 10:19:01 +0100 [thread overview]
Message-ID: <20201030091901.3wktfpjmup64kflh@melmoth> (raw)
In-Reply-To: <20201029215053.GA11109@jasmine.lan>
Hi Leo!
Le 10/29, Leo Famulari a écrit :
> On Thu, Oct 29, 2020 at 10:14:27AM -0400, Leo Famulari wrote:
> > Okay, I will take a look at the scipy thing today.
>
> I decided to let scipy be propagated since it's normal for Python things
> to be propagated. But I still think we should hard-code the reference to
> ffmpeg.
>
> I looked at the code, and it finds ffmpeg-related programs in
> 'pydub/utils.py', in the functions get_encoder_name(),
> get_player_name(), and get_prober_name().
>
> I think it should be sufficient to substitute any mention of the words
> "ffmpeg", "ffplay", and "ffprobe" with the full store-path of those
> programs.
+1…
> I included a diff on your patch. You can see exactly what it does by
> adding (error "Stopping...") after the substitute*, building with
> --keep-failed, and then looking at the 'pydub/utils.py' file.
>
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index 3c2d882003e..47ec542e6d1 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -16696,9 +16696,24 @@ ignoring formatting changes.")
> "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
> (build-system python-build-system)
> (home-page "http://pydub.com")
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'patch-ffmpeg-references
> + (lambda* (#:key inputs #:allow-other-keys)
> + (let* ((ffmpeg-store-item (assoc-ref inputs "ffmpeg"))
> + (ffmpeg (string-append ffmpeg-store-item "/bin/ffmpeg"))
> + (ffplay (string-append ffmpeg-store-item "/bin/ffplay"))
> + (ffprobe (string-append ffmpeg-store-item "/bin/ffprobe")))
> + (substitute* "pydub/utils.py"
> + (("ffmpeg") ffmpeg)
> + (("ffplay") ffplay)
> + (("ffprobe") ffprobe))
> + #t))))))
> + (inputs
> + `(("ffmpeg" ,ffmpeg)))
> (propagated-inputs
> - `(("ffmpeg" ,ffmpeg)
> - ("python-scipy" ,python-scipy)))
> + `(("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
So I guess you didn't see the one I submitted: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44275#14 :-(
I was really proud, because… it worked! :-)
But yours is shorter and does the job (even if it "brute-force" replaces all
the occurences of "ffmpeg", even in the comments!) and I'm totally fine
with it!
Thanks again for your help and your time!
--
Tanguy
next prev parent reply other threads:[~2020-10-30 9:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-28 8:56 [bug#44275] [PATCH] gnu: Add python-pydub Tanguy Le Carrour
2020-10-28 16:34 ` Leo Famulari
2020-10-29 8:26 ` Tanguy Le Carrour
2020-10-29 14:14 ` Leo Famulari
2020-10-29 14:39 ` Tanguy Le Carrour
2020-10-29 21:50 ` Leo Famulari
2020-10-30 9:19 ` Tanguy Le Carrour [this message]
2020-10-30 20:42 ` Leo Famulari
2020-10-29 9:09 ` [bug#44275] [PATCH v2] " Tanguy Le Carrour
2020-10-30 20:40 ` bug#44275: " Leo Famulari
2020-10-30 21:10 ` [bug#44275] " Tanguy LE CARROUR
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201030091901.3wktfpjmup64kflh@melmoth \
--to=tanguy@bioneland.org \
--cc=44275@debbugs.gnu.org \
--cc=leo@famulari.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.