[PATCH] gnu: yt-dlp: Update to 2022.07.18.

  • Done
  • quality assurance status badge
Details
4 participants
  • kiasoc5
  • Liliana Marie Prikler
  • Liliana Marie Prikler
  • (
Owner
unassigned
Submitted by
kiasoc5
Severity
normal

Debbugs page

kiasoc5 wrote 3 years ago
(address . guix-patches@gnu.org)
20220804203718.6f4a650a@aria

From 5b849db4dd60a33ab20bb9552133094f16df21c3 Mon Sep 17 00:00:00 2001
From: kiasoc5 <kiasoc5@disroot.org>
Date: Tue, 2 Aug 2022 23:35:55 -0400
Subject: [PATCH] gnu: yt-dlp: Update to 2022.07.18.

* gnu/packages/video.scm (yt-dlp): Update to 2022.07.18.
---
gnu/packages/video.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 04049fd9c8..f5316b8925 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2474,7 +2474,7 @@ (define-public youtube-dl
(define-public yt-dlp
(package/inherit youtube-dl
(name "yt-dlp")
- (version "2022.06.22.1")
+ (version "2022.07.18")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/yt-dlp/yt-dlp/"
@@ -2482,7 +2482,7 @@ (define-public yt-dlp
version "/yt-dlp.tar.gz"))
(sha256
(base32
- "1nr6g3dhvjc10jzhyvgjrrxqhsgi3hiw8bswp8bi6bscimd9vhps"))
+ "00pcd4mdl19kb6iwk0i58a23f5m49h2gjygszz9vglf8dby82yqf"))
(snippet
'(begin
;; Delete the pre-generated files, except for the man page

base-commit: a956c7df87536717e4e04af11ae6d73dcb7a2ce7
--
2.37.1
( wrote 3 years ago
CLXJAC6CHSFZ.1EOCD0DI7ZOJT@guix-aspire
SGTM, but could you use `git send-email` https://git-send-email.io to
send patches instead of attachments? It makes reading and applying them
much easier, at least in aerc :)

-- (
kiasoc5 wrote 3 years ago
[PATCH] gnu: yt-dlp: Update to 2022.07.18, use gexps and new style inputs.
(address . 56983@debbugs.gnu.org)(name . kiasoc5)(address . kiasoc5@disroot.org)
20220805053011.387828-1-kiasoc5@disroot.org
* gnu/packages/video.scm (yt-dlp): Update to 2022.07.18.
[arguments]: Use gexps.
[inputs]: Use new style.
[native-inputs]: Likewise.
---
gnu/packages/video.scm | 70 ++++++++++++++++++++----------------------
1 file changed, 34 insertions(+), 36 deletions(-)

Toggle diff (97 lines)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 04049fd9c8..8cd6d03688 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2474,7 +2474,7 @@ (define-public youtube-dl
(define-public yt-dlp
(package/inherit youtube-dl
(name "yt-dlp")
- (version "2022.06.22.1")
+ (version "2022.07.18")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/yt-dlp/yt-dlp/"
@@ -2482,7 +2482,7 @@ (define-public yt-dlp
version "/yt-dlp.tar.gz"))
(sha256
(base32
- "1nr6g3dhvjc10jzhyvgjrrxqhsgi3hiw8bswp8bi6bscimd9vhps"))
+ "1wmzfqhysx1mqdba4ikvm6nbahasihi4xgqwqad20y3vs701slyj"))
(snippet
'(begin
;; Delete the pre-generated files, except for the man page
@@ -2497,40 +2497,38 @@ (define-public yt-dlp
(substitute-keyword-arguments (package-arguments youtube-dl)
((#:tests? _) #t)
((#:phases phases)
- `(modify-phases ,phases
- ;; See the comment for the corresponding phase in youtube-dl.
- (replace 'default-to-the-ffmpeg-input
- (lambda _
- (substitute* "yt_dlp/postprocessor/ffmpeg.py"
- (("\\.get_param\\('ffmpeg_location'\\)" match)
- (format #f "~a or '~a'" match (which "ffmpeg"))))))
- (replace 'build-generated-files
- (lambda _
- ;; Avoid the yt-dlp.1 target, which requires pandoc.
- (invoke "make" "PYTHON=python" "yt-dlp" "completions")))
- (replace '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/"))))))
- (delete 'install-completion)
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest" "-k" "not download"))))))))
- (inputs
- `(("python-brotli" ,python-brotli)
- ("python-certifi" ,python-certifi)
- ("python-mutagen" ,python-mutagen)
- ("python-pycryptodomex" ,python-pycryptodomex)
- ("python-websockets" ,python-websockets)
- ,@(package-inputs youtube-dl)))
- (native-inputs
- `(("python-pytest" ,python-pytest)
- ,@(package-native-inputs youtube-dl)))
+ #~(modify-phases #$phases
+ ;; See the comment for the corresponding phase in youtube-dl.
+ (replace 'default-to-the-ffmpeg-input
+ (lambda _
+ (substitute* "yt_dlp/postprocessor/ffmpeg.py"
+ (("\\.get_param\\('ffmpeg_location'\\)" match)
+ (format #f "~a or '~a'" match (which "ffmpeg"))))))
+ (replace 'build-generated-files
+ (lambda _
+ ;; Avoid the yt-dlp.1 target, which requires pandoc.
+ (invoke "make" "PYTHON=python" "yt-dlp" "completions")))
+ (replace '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/"))))))
+ (delete 'install-completion)
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-k" "not download"))))))))
+ (inputs (modify-inputs (package-inputs youtube-dl)
+ (append python-brotli
+ python-certifi
+ python-mutagen
+ python-pycryptodomex
+ python-websockets)))
+ (native-inputs (modify-inputs (package-native-inputs youtube-dl)
+ (append python-pytest)))
(description
"yt-dlp is a small command-line program to download videos from
YouTube.com and many more sites. It is a fork of youtube-dl with a
--
2.37.1
Liliana Marie Prikler wrote 3 years ago
26f9b3120f00ca03839ac9a8a974a61759bfcff4.camel@ist.tugraz.at
Am Freitag, dem 05.08.2022 um 01:30 -0400 schrieb kiasoc5:
Toggle quote (1 lines)
> * gnu/packages/video.scm (yt-dlp): Update to 2022.07.18.
-- Split --
Toggle quote (3 lines)
> [arguments]: Use gexps.
> [inputs]: Use new style.
> [native-inputs]: Likewise.
For the second patch, use "gnu: yt-dlp: Use new package style." as
title.

Toggle quote (29 lines)
> ---
>  gnu/packages/video.scm | 70 ++++++++++++++++++++----------------------
>  1 file changed, 34 insertions(+), 36 deletions(-)
>
> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
> index 04049fd9c8..8cd6d03688 100644
> --- a/gnu/packages/video.scm
> +++ b/gnu/packages/video.scm
> @@ -2474,7 +2474,7 @@ (define-public youtube-dl
>  (define-public yt-dlp
>    (package/inherit youtube-dl
>      (name "yt-dlp")
> -    (version "2022.06.22.1")
> +    (version "2022.07.18")
>      (source (origin
>                (method url-fetch)
>                (uri (string-append "https://github.com/yt-dlp/yt-dlp/"
> @@ -2482,7 +2482,7 @@ (define-public yt-dlp
>                                    version "/yt-dlp.tar.gz"))
>                (sha256
>                 (base32
> -               
> "1nr6g3dhvjc10jzhyvgjrrxqhsgi3hiw8bswp8bi6bscimd9vhps"))
> +               
> "1wmzfqhysx1mqdba4ikvm6nbahasihi4xgqwqad20y3vs701slyj"))
>                (snippet
>                 '(begin
>                    ;; Delete the pre-generated files, except for the
> man page
Haven't checked the hash, but on the premise that it's good, LGTM.

-- Split --
Toggle quote (68 lines)
> @@ -2497,40 +2497,38 @@ (define-public yt-dlp
>       (substitute-keyword-arguments (package-arguments youtube-dl)
>         ((#:tests? _) #t)
>         ((#:phases phases)
> -        `(modify-phases ,phases
> -           ;; See the comment for the corresponding phase in
> youtube-dl.
> -           (replace 'default-to-the-ffmpeg-input
> -             (lambda _
> -               (substitute* "yt_dlp/postprocessor/ffmpeg.py"
> -                 (("\\.get_param\\('ffmpeg_location'\\)" match)
> -                  (format #f "~a or '~a'" match (which
> "ffmpeg"))))))
> -           (replace 'build-generated-files
> -             (lambda _
> -               ;; Avoid the yt-dlp.1 target, which requires pandoc.
> -               (invoke "make" "PYTHON=python" "yt-dlp"
> "completions")))
> -           (replace '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/"))))))
> -           (delete 'install-completion)
> -           (replace 'check
> -             (lambda* (#:key tests? #:allow-other-keys)
> -               (when tests?
> -                 (invoke "pytest" "-k" "not download"))))))))
> -    (inputs
> -     `(("python-brotli" ,python-brotli)
> -       ("python-certifi" ,python-certifi)
> -       ("python-mutagen" ,python-mutagen)
> -       ("python-pycryptodomex" ,python-pycryptodomex)
> -       ("python-websockets" ,python-websockets)
> -       ,@(package-inputs youtube-dl)))
> -    (native-inputs
> -     `(("python-pytest" ,python-pytest)
> -       ,@(package-native-inputs youtube-dl)))
> +         #~(modify-phases #$phases
> +            ;; See the comment for the corresponding phase in
> youtube-dl.
> +            (replace 'default-to-the-ffmpeg-input
> +              (lambda _
> +                (substitute* "yt_dlp/postprocessor/ffmpeg.py"
> +                  (("\\.get_param\\('ffmpeg_location'\\)" match)
> +                   (format #f "~a or '~a'" match (which
> "ffmpeg"))))))
> +            (replace 'build-generated-files
> +              (lambda _
> +                ;; Avoid the yt-dlp.1 target, which requires pandoc.
> +                (invoke "make" "PYTHON=python" "yt-dlp"
> "completions")))
> +            (replace '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/"))))))
> +            (delete 'install-completion)
> +            (replace 'check
> +              (lambda* (#:key tests? #:allow-other-keys)
> +                (when tests?
> +                  (invoke "pytest" "-k" "not download"))))))))
The indentation here seems a little off. Did you TAB in Emacs?
Toggle quote (8 lines)
> +    (inputs (modify-inputs (package-inputs youtube-dl)
> +              (append python-brotli
> +                      python-certifi
> +                      python-mutagen
> +                      python-pycryptodomex
> +                      python-websockets)))
> +    (native-inputs (modify-inputs (package-native-inputs youtube-dl)
> +                     (append python-pytest)))
LGTM.

Cheers
kiasoc5 wrote 3 years ago
Re: [PATCH] gnu: yt-dlp: Update to 2022.07.18, use gexps and new style inputs.
20220806052833.183236-1-kiasoc5@disroot.org
On Fri, Aug 05 2022, 10:01:42 AM +0200
Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> wrote:

Toggle quote (2 lines)
> The indentation here seems a little off. Did you TAB in Emacs?

Split version and style update into 2 packages and tabbed with Emacs.
kiasoc5 wrote 3 years ago
[PATCH 1/2] gnu: yt-dlp: Update to 2022.07.18.
(address . 56983@debbugs.gnu.org)(name . kiasoc5)(address . kiasoc5@disroot.org)
20220806052833.183236-2-kiasoc5@disroot.org
* gnu/packages/video.scm (yt-dlp): Update to 2022.07.18.
---
gnu/packages/video.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 04049fd9c8..017c0d3857 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2474,7 +2474,7 @@ (define-public youtube-dl
(define-public yt-dlp
(package/inherit youtube-dl
(name "yt-dlp")
- (version "2022.06.22.1")
+ (version "2022.07.18")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/yt-dlp/yt-dlp/"
@@ -2482,7 +2482,7 @@ (define-public yt-dlp
version "/yt-dlp.tar.gz"))
(sha256
(base32
- "1nr6g3dhvjc10jzhyvgjrrxqhsgi3hiw8bswp8bi6bscimd9vhps"))
+ "1wmzfqhysx1mqdba4ikvm6nbahasihi4xgqwqad20y3vs701slyj"))
(snippet
'(begin
;; Delete the pre-generated files, except for the man page
--
2.37.1
kiasoc5 wrote 3 years ago
[PATCH 2/2] gnu: yt-dlp: Use new package style.
(address . 56983@debbugs.gnu.org)(name . kiasoc5)(address . kiasoc5@disroot.org)
20220806052833.183236-3-kiasoc5@disroot.org
* gnu/packages/video.scm
(yt-dlp)[source](snippet): Rewrite snippet as a gexp.
[arguments]: Use gexps.
[inputs]: Use new style.
[native-inputs]: Likewise.
---
gnu/packages/video.scm | 85 +++++++++++++++++++++---------------------
1 file changed, 42 insertions(+), 43 deletions(-)

Toggle diff (102 lines)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 017c0d3857..c681165f2e 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2484,53 +2484,52 @@ (define-public yt-dlp
(base32
"1wmzfqhysx1mqdba4ikvm6nbahasihi4xgqwqad20y3vs701slyj"))
(snippet
- '(begin
- ;; Delete the pre-generated files, except for the man page
- ;; which requires 'pandoc' to build.
- (for-each delete-file '("yt-dlp"
- ;;pandoc is needed to generate
- ;;"yt-dlp.1"
- "completions/bash/yt-dlp"
- "completions/fish/yt-dlp.fish"
- "completions/zsh/_yt-dlp"))))))
+ #~(begin
+ ;; Delete the pre-generated files, except for the man page
+ ;; which requires 'pandoc' to build.
+ (for-each delete-file
+ (list "yt-dlp"
+ ;;pandoc is needed to generate
+ ;;"yt-dlp.1"
+ "completions/bash/yt-dlp"
+ "completions/fish/yt-dlp.fish"
+ "completions/zsh/_yt-dlp"))))))
(arguments
(substitute-keyword-arguments (package-arguments youtube-dl)
((#:tests? _) #t)
((#:phases phases)
- `(modify-phases ,phases
- ;; See the comment for the corresponding phase in youtube-dl.
- (replace 'default-to-the-ffmpeg-input
- (lambda _
- (substitute* "yt_dlp/postprocessor/ffmpeg.py"
- (("\\.get_param\\('ffmpeg_location'\\)" match)
- (format #f "~a or '~a'" match (which "ffmpeg"))))))
- (replace 'build-generated-files
- (lambda _
- ;; Avoid the yt-dlp.1 target, which requires pandoc.
- (invoke "make" "PYTHON=python" "yt-dlp" "completions")))
- (replace '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/"))))))
- (delete 'install-completion)
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest" "-k" "not download"))))))))
- (inputs
- `(("python-brotli" ,python-brotli)
- ("python-certifi" ,python-certifi)
- ("python-mutagen" ,python-mutagen)
- ("python-pycryptodomex" ,python-pycryptodomex)
- ("python-websockets" ,python-websockets)
- ,@(package-inputs youtube-dl)))
- (native-inputs
- `(("python-pytest" ,python-pytest)
- ,@(package-native-inputs youtube-dl)))
+ #~(modify-phases #$phases
+ ;; See the comment for the corresponding phase in youtube-dl.
+ (replace 'default-to-the-ffmpeg-input
+ (lambda _
+ (substitute* "yt_dlp/postprocessor/ffmpeg.py"
+ (("\\.get_param\\('ffmpeg_location'\\)" match)
+ (format #f "~a or '~a'" match (which "ffmpeg"))))))
+ (replace 'build-generated-files
+ (lambda _
+ ;; Avoid the yt-dlp.1 target, which requires pandoc.
+ (invoke "make" "PYTHON=python" "yt-dlp" "completions")))
+ (replace '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/"))))))
+ (delete 'install-completion)
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-k" "not download"))))))))
+ (inputs (modify-inputs (package-inputs youtube-dl)
+ (append python-brotli
+ python-certifi
+ python-mutagen
+ python-pycryptodomex
+ python-websockets)))
+ (native-inputs (modify-inputs (package-native-inputs youtube-dl)
+ (append python-pytest)))
(description
"yt-dlp is a small command-line program to download videos from
YouTube.com and many more sites. It is a fork of youtube-dl with a
--
2.37.1
Liliana Marie Prikler wrote 3 years ago
16dabe45094bfeff4eb294b04d0d02d13df4fc11.camel@gmail.com
Am Samstag, dem 06.08.2022 um 01:28 -0400 schrieb kiasoc5:
Toggle quote (5 lines)
> * gnu/packages/video.scm
> (yt-dlp)[source](snippet): Rewrite snippet as a gexp.
> [arguments]: Use gexps.
> [inputs]: Use new style.
> [native-inputs]: Likewise.
Pushed with slight changes to the ChangeLog.

Cheers
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 56983@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 56983
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help