From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id QJ6kMTnbm1+mCAAA0tVLHw (envelope-from ) for ; Fri, 30 Oct 2020 09:22:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id T/SKLTnbm1+9PwAAbx9fmQ (envelope-from ) for ; Fri, 30 Oct 2020 09:22:01 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6262F9403A6 for ; Fri, 30 Oct 2020 09:22:01 +0000 (UTC) Received: from localhost ([::1]:58216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYQbg-0001jI-Cs for larch@yhetil.org; Fri, 30 Oct 2020 05:22:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYQZm-0000Pe-R9 for guix-patches@gnu.org; Fri, 30 Oct 2020 05:20:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44516) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYQZm-0001b9-I3 for guix-patches@gnu.org; Fri, 30 Oct 2020 05:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYQZm-0003OS-Cw for guix-patches@gnu.org; Fri, 30 Oct 2020 05:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44275] [PATCH] gnu: Add python-pydub. Resent-From: Tanguy Le Carrour Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Oct 2020 09:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44275 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Leo Famulari Cc: 44275@debbugs.gnu.org Received: via spool by 44275-submit@debbugs.gnu.org id=B44275.160404955412978 (code B ref 44275); Fri, 30 Oct 2020 09:20:02 +0000 Received: (at 44275) by debbugs.gnu.org; 30 Oct 2020 09:19:14 +0000 Received: from localhost ([127.0.0.1]:56062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYQYz-0003NF-Rw for submit@debbugs.gnu.org; Fri, 30 Oct 2020 05:19:14 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:47179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYQYy-0003N1-Fs for 44275@debbugs.gnu.org; Fri, 30 Oct 2020 05:19:13 -0400 X-Originating-IP: 176.185.184.238 Received: from localhost (static-176-185-184-238.axione.abo.bbox.fr [176.185.184.238]) (Authenticated sender: tanguy@bioneland.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 6D743E0015; Fri, 30 Oct 2020 09:19:02 +0000 (UTC) Date: Fri, 30 Oct 2020 10:19:01 +0100 From: Tanguy Le Carrour Message-ID: <20201030091901.3wktfpjmup64kflh@melmoth> References: <20201028085654.18295-1-tanguy@bioneland.org> <20201028163450.GE12095@jasmine.lan> <20201029082657.xb3we5aqncp7qqci@rafflesia> <20201029141427.GB8956@jasmine.lan> <20201029215053.GA11109@jasmine.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201029215053.GA11109@jasmine.lan> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.51 X-TUID: ynemCy3tqXgz 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