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 ms0.migadu.com with LMTPS id 6WCZBskgdmHUWQAAgWs5BA (envelope-from ) for ; Mon, 25 Oct 2021 05:13:13 +0200 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 aHeDAckgdmGVJAAAbx9fmQ (envelope-from ) for ; Mon, 25 Oct 2021 03:13:13 +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 3503F37733 for ; Mon, 25 Oct 2021 05:13:12 +0200 (CEST) Received: from localhost ([::1]:37866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1meqQB-0008AD-7p for larch@yhetil.org; Sun, 24 Oct 2021 23:13:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meqQ2-0008A5-ED for guix-patches@gnu.org; Sun, 24 Oct 2021 23:13:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58054) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1meqQ2-0005Go-0Q for guix-patches@gnu.org; Sun, 24 Oct 2021 23:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1meqQ1-0005qB-QY for guix-patches@gnu.org; Sun, 24 Oct 2021 23:13:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51179] [PATCH] gnu: Add yt-dlp. In-Reply-To: <87pms9mf7a.fsf@terpri.org> Resent-From: Robin Templeton Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Oct 2021 03:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51179 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: 51179@debbugs.gnu.org Received: via spool by 51179-submit@debbugs.gnu.org id=B51179.163513154622388 (code B ref 51179); Mon, 25 Oct 2021 03:13:01 +0000 Received: (at 51179) by debbugs.gnu.org; 25 Oct 2021 03:12:26 +0000 Received: from localhost ([127.0.0.1]:41367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meqPS-0005p1-27 for submit@debbugs.gnu.org; Sun, 24 Oct 2021 23:12:26 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:49400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meqPQ-0005op-Ks for 51179@debbugs.gnu.org; Sun, 24 Oct 2021 23:12:25 -0400 Received: from [2603:6081:2241:752:71c3:6c06:a290:62ae] (helo=cervus) by minsky.hcoop.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1meqPL-0006j1-7K; Sun, 24 Oct 2021 23:12:19 -0400 From: Robin Templeton References: <87pms9mf7a.fsf@terpri.org> <87ee8pm6sn.fsf_-_@terpri.org> <99268fb747b2278cc0e279c5efc83f5bbbfaccf1.camel@gmail.com> Date: Sun, 24 Oct 2021 23:12:06 -0400 Message-ID: <8735opvlvd.fsf@terpri.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635131592; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=lXY90OgBLZ3dwIVojLHubUMILzaYWyN5x1wi0Ok+aGw=; b=GRP13cUUwsHRdA9HgnSgV2kMyJdPsdT8EnlEtST2EY3wVEgnAdGxWG+Eexx8RgVd5pu+Tk UMeuDJMNZgtLjKWlyvxb3K2awl88Hq8o+JV/HkkC4cC6YeU8XqWJ4a3gjnmLz3jycWQ2Z4 xe01WESAW3OReKBulznY+QAcYpylR1SYL6JnZrzZ/LwHXQINPZCOJ3A9+Qf5FlhhrDjpZX 5DMtFNbtiId6NCXA1H4aAl5f6Ri85ynioW3KqcUWZIHa2OL8YgLqvlwY9pHlDvNYdb3rTU MUTzXUxP9KsST+FwaofdwGBasPTMG44vF9NaZek9Vzkpm34oqoPrgaFbLg1uSw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635131592; a=rsa-sha256; cv=none; b=R09zZSSE5r80Qxd7TxSNB7tSW0J2LpxcVuoDu3/3yAB92AZnDB2RiIVKn3QILuupqqEe+U vymTCqcATAVvy/mjZdldvljK33jFFKq4HIYcLThdfF/Ion0HLxP1sUgyp0Ap9zFtmLJSTQ GSulqQyvdoFslqIPAqoto1MF+K6sGfzBUfsmxGjF/jm76u43/QiLevidba/NH+89ALA/w6 SMSUGlCCxUdltAG2V/QBBrGA1Elyc04047RmQJG6kigOOy1fhJBeC5Tv3Ojjian8ilBz4D 2DvDO1ZPGr/ue8zVOxw9MEpIQ58/NrToQKg32g6aovsZvlzDptqo+F/1TvZGoA== ARC-Authentication-Results: i=1; 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-Migadu-Spam-Score: -2.43 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-Migadu-Queue-Id: 3503F37733 X-Spam-Score: -2.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: gjAgEeLbAWwn Liliana Marie Prikler writes: > Hi Robin, > > when pasting other stuff into a patch, one usually ought to do so after > the "---" line before the summary and the first diff. Ah, thanks for the reminder, it's been a minute since I used email for patch submissions :) So IIUC, it's preferable to write: > * gnu/packages/video.scm (yt-dlp): New variable. [...] > --- > > [RANDOM COMMENTS HERE] > > gnu/packages/video.scm | 61 > ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 61 insertions(+) rather than using "cut here" lines and the like. > Am Mittwoch, den 13.10.2021, 08:46 -0400 schrieb Robin Templeton: >> Liliana Marie Prikler writes: >> >> [...] >> > > + (snippet >> > > + '(begin >> > > + ;; Delete the pre-generated files, except for >> > > the man page >> > > + ;; which requires 'pandoc' to build. >> [...] >> > Is this the same as for youtube-dl? If not, we might want to give >> > pandoc as native-input. That will increase build times, but it >> > ought not to increase closure size. >> >> This is analogous to youtube-dl's pandoc avoidance; IMHO youtube-dl >> ought to use pandoc as a native input, but I wanted to keep the >> packaging as close to youtube-dl's as possible. > Hence why I asked whether youtube-dl does the same. Making that change > would probably be out of scope for now. +1 >> [...] >> > > + (add-before 'build 'build-generated-files >> > > + (lambda _ >> > > + ;; Avoid the make targets that require >> > > pandoc. >> > > + (invoke "make" >> > > + "PYTHON=python" >> > > + "yt-dlp" >> > > + ;;"youtube-dl.1" ; needs pandoc >> > > + "completions"))) >> > > + (add-before 'install 'fix-the-data-directories >> > > + (lambda* (#:key outputs #:allow-other-keys) >> > > + (let ((prefix (assoc-ref outputs "out"))) >> > > + (substitute* "setup.py" >> > > + (("'etc/") >> > > + (string-append "'" prefix "/etc/")) >> > > + (("'share/") >> > > + (string-append "'" prefix >> > > "/share/"))) >> > > + #t)))))) >> > Horizontal space is at a premium and you can save some. >> >> I'm not sure where exactly this should use fewer columns, but I >> squeezed the make invocation onto a single line. > You fixed it by accident, given that you're now required to use > substitute-keyword-arguments*, putting #:phases on an extra line as it > ought to be. Oh, I see what you meant now, thanks for clarifying. >> v2 also adds three inputs needed for the program to run correctly >> (updated based on efraim's yt-dlp package, ;; in >> that package, the extra libraries are propagated inputs, but adding >> them as regular inputs appears to be sufficient). > Can we somehow verify that this is indeed the case? Normally we would > wrap PYTHONPATH in such a case. python-build-system wraps the yt-dlc script correctly, although (as jgart explained to me on IRC) the Python library inputs would need to become propagated inputs if users or future packages want to use yt-dlc as a library. Morgan's patch packages yt-dlc the way I'd package *youtube-dl* (using a git origin, generating the manpage with pandoc, etc.) but yt-dlc doesn't inherit from youtube-dl in their patch. The non-downloading-related part of yt-dlc's test suite (~10% of tests) *does* run without failures, unlike youtube-dl, so I enabled tests and added the pytest invocation from Morgan's version; otherwise, no changes in v3 (besides using the latest yt-dlc release), which I'll post as a follow-up. I don't have a strong opinion about my patch vs. Morgan's for an initial version; at some point I think youtube-dl should be packaged similarly to Morgan's approach, which would allow the yt-dlc definition to be simplified too, but my patch is written to inherit from youtube-dl as it's packaged now. IMO the order of the changes doesn't matter much. Thanks, Robin -- Inteligenta persono lernas la lingvon Esperanton rapide kaj facile. Esperanto estas moderna, kultura lingvo por la mondo. Simpla, fleksebla, belsona, Esperanto estas la praktika solvo de la problemo de universala interkompreno. Lernu la interlingvon Esperanton!