unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Parnikkapore via Guix-patches via <guix-patches@gnu.org>
To: 64732@debbugs.gnu.org
Cc: Lars-Dominik Braun <lars@6xq.net>, jgart <jgart@dismail.de>
Subject: [bug#64732] [PATCH v4 1/2] gnu: Add python-ffmpeg-python.
Date: Fri,  4 Aug 2023 22:56:09 +0800	[thread overview]
Message-ID: <6c8737581d9018c48763b23d237978fb639c78c7.1691160970.git.poomklao@yahoo.com> (raw)
In-Reply-To: <4f14b81fb26bfa703b3fe37c8e1c93ae@dismail.de>

* gnu/packages/python-xyz.scm (python-ffmpeg-python): New variable.
---

Here's a v4 that hardcodes and no longer propagates ffmpeg. One of the tests check the
command to be run, including the ffmpeg command used, so that test has to be patched too.

 gnu/packages/python-xyz.scm | 48 +++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 755b0af4b6..23d14db449 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -139,6 +139,7 @@
 ;;; Copyright © 2023 Dominik Delgado Steuter <d@delgado.nrw>
 ;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan@selidor.net>
 ;;; Copyright © 2023 Ontje Lünsdorf <ontje.luensdorf@dlr.de>
+;;; Copyright © 2023 Parnikkapore <poomklao@yahoo.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -8918,6 +8919,53 @@ (define-public python-lfdfiles
 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
     (license license:bsd-3)))
 
+(define-public python-ffmpeg-python
+  ;; The latest release (0.2.0) is old and its test suite crashs on Python 3.10.
+  (let ((commit "df129c7ba30aaa9ffffb81a48f53aa7253b0b4e6") (revision "0"))
+    (package
+      (name "python-ffmpeg-python")
+      (version (git-version "0.2.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/kkroening/ffmpeg-python.git")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1zj4ac37n4igfj21zy405mdlvbpv6jyb12wfpszf8zkhhj2qby4c"))))
+      (build-system python-build-system)
+      (arguments
+       (list
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'hardcode-ffmpeg
+              (lambda* (#:key inputs #:allow-other-keys)
+                (define ffmpeg (search-input-file inputs "bin/ffmpeg"))
+                (substitute* "ffmpeg/_run.py"
+                  (("cmd='ffmpeg'")
+                   (string-append "cmd='" ffmpeg "'")))
+                (substitute* "ffmpeg/tests/test_ffmpeg.py"
+                  (("out_file.compile\\(\\) == \\['ffmpeg'")
+                   (string-append "out_file.compile() == ['" ffmpeg "'")))))
+            ;; Some tests fail with ffmpeg 5+
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (invoke "pytest" "-vv"
+                          "-k" "not test_pipe and not test__probe")))))))
+      (inputs (list ffmpeg))
+      (propagated-inputs (list python-future))
+      (native-inputs (list python-future python-numpy python-pytest
+                           python-pytest-mock python-pytest-runner))
+      (home-page "https://github.com/kkroening/ffmpeg-python")
+      (synopsis "Python bindings for FFmpeg - with complex filtering support")
+      (description
+       "ffmpeg-python allows you to write FFmpeg filtergraphs in familiar
+Python terms, taking care of running ffmpeg with the correct command-line
+arguments. It handles arbitrarily large (directed-acyclic) signal graphs.")
+      (license license:asl2.0))))
+
 (define-public python-imageio-ffmpeg
   (package
    (name "python-imageio-ffmpeg")

base-commit: 1d837aaa32a3a2de8f4a1ac391f92effba50834e
-- 
2.41.0





  reply	other threads:[~2023-08-04 15:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1689780467.git.poomklao.ref@yahoo.com>
2023-07-19 15:30 ` [bug#64732] [PATCH 0/2] Add r128gain Parnikkapore via Guix-patches via
2023-07-19 15:34   ` [bug#64732] [PATCH 1/2] gnu: Add python-ffmpeg-python Parnikkapore via Guix-patches via
2023-07-19 15:34   ` [bug#64732] [PATCH 2/2] gnu: Add r128gain Parnikkapore via Guix-patches via
2023-07-19 23:40   ` [bug#64732] [PATCH 1/2] gnu: Add python-ffmpeg-python jgart via Guix-patches via
2023-07-20  2:34     ` Parnikkapore via Guix-patches via
2023-07-20  4:08     ` jgart via Guix-patches via
2023-07-20 15:51   ` [bug#64732] [PATCH v2 " Parnikkapore via Guix-patches via
2023-07-20 15:51     ` [bug#64732] [PATCH v2 2/2] gnu: Add r128gain Parnikkapore via Guix-patches via
     [not found]     ` <eb3eaaa0e7f3d610c6ea0bcc8e170c9544397520.1689868307.git.poomklao.ref@yahoo.com>
2023-07-20 17:00       ` [bug#64732] [PATCH v2 1/2] gnu: Add python-ffmpeg-python jgart via Guix-patches via
2023-07-21  6:50         ` [bug#64732] [PATCH v3 " Parnikkapore via Guix-patches via
2023-07-21  6:50           ` [bug#64732] [PATCH v3 2/2] gnu: Add r128gain Parnikkapore via Guix-patches via
     [not found]           ` <bcae23c779592e17719214ec54c89ba86c2e9aa9.1689922236.git.poomklao.ref@yahoo.com>
2023-07-22 13:06             ` [bug#64732] [PATCH v3 1/2] gnu: Add python-ffmpeg-python jgart via Guix-patches via
2023-07-22 13:50               ` Parnikkapore via Guix-patches via
2023-07-22 13:54             ` jgart via Guix-patches via
2023-07-22 15:59               ` Lars-Dominik Braun
2023-07-22 18:13               ` jgart via Guix-patches via
2023-07-24 19:11               ` jgart via Guix-patches via
2023-08-04 14:56                 ` Parnikkapore via Guix-patches via [this message]
2023-08-04 14:56                   ` [bug#64732] [PATCH v4 2/2] gnu: Add r128gain Parnikkapore via Guix-patches via
2023-08-20 21:08                   ` bug#64732: [PATCH 0/2] " Ludovic Courtès
2023-07-22 14:34             ` [bug#64732] [PATCH v3 1/2] gnu: Add python-ffmpeg-python jgart via Guix-patches via

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c8737581d9018c48763b23d237978fb639c78c7.1691160970.git.poomklao@yahoo.com \
    --to=guix-patches@gnu.org \
    --cc=64732@debbugs.gnu.org \
    --cc=jgart@dismail.de \
    --cc=lars@6xq.net \
    --cc=poomklao@yahoo.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).