From: Tomasz Jeneralczyk <tj@schwi.pl>
To: 56803@debbugs.gnu.org
Cc: Tomasz Jeneralczyk <tj@schwi.pl>
Subject: [bug#56803] [PATCH v2 3/6] gnu: Add python-mpv.
Date: Sun, 14 Aug 2022 14:46:20 +0200 [thread overview]
Message-ID: <08140eaac786e693cc7ac33208e4080650dcfb26.1660481045.git.tj@schwi.pl> (raw)
In-Reply-To: <458d155cb6f630e0e8aea1793a4c97b3d76520e6.1660481045.git.tj@schwi.pl>
Author states that the license of the library is inherited from libmpv,
which can be either GPLv2 or LPGLv2.1. That's why the package's license is
set to be the same as mpv's.
One of the tests had to be disabled because it would neither fail or pass,
blocking all other tests from running and the package from finishing its build
process. I have no clue on why it happens.
Rarely some tests fail without any apparent reason. This is possibly related
to: https://github.com/jaseg/python-mpv/issues/209
Also add copyright.
* gnu/packages/python-xyz.scm (python-mpv): Add variable.
---
gnu/packages/python-xyz.scm | 63 +++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 13ab2f2c8b..51bf4d5c0b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -127,6 +127,7 @@
;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com>
;;; Copyright © 2022 Marek Felšöci <marek@felsoci.sk>
;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
+;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -30388,6 +30389,68 @@ (define-public python-bsdiff4
and @code{bspatch4}.")
(license license:bsd-2)))
+(define-public python-mpv
+ (package
+ (name "python-mpv")
+ (version "v1.0.1")
+ (source
+ (origin
+ ;; python-mpv from pypi does not include the tests directory.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jaseg/python-mpv")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "10w6j3n62ap45sf6q487kz8z6g58sha37i14fa2hhng794z7a8jh"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; One of the tests never completes, so neutering it using
+ ;; early return allows other test to run without issue.
+ (substitute* "tests/test_mpv.py"
+ ;; Note the typo in "prooperty" - this was fixed later in
+ ;; upstream but has no effect on whether the tests hangs or not.
+ (("test_wait_for_prooperty_event_overflow.*" line)
+ ;; The long whitespace between \n and return is to match the
+ ;; identation level, which is significant in python.
+ (string-append line "\n return\n")))))))
+ (build-system python-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'patch-reference-to-mpv
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Without an absolute path it is not able find and
+ ;; load the libmpv library.
+ (substitute* "mpv.py"
+ (("sofile = .*")
+ (string-append "sofile = \""
+ (search-input-file inputs "/lib/libmpv.so")
+ "\"\n")))))
+ (add-before 'check 'prepare-for-tests
+ (lambda _
+ ;; Fontconfig throws errors when it has no cache dir to use.
+ (setenv "XDG_CACHE_HOME" (getcwd))
+ ;; Some tests fail without a writable and readable HOME.
+ (setenv "HOME" (getcwd)))))))
+ (native-inputs
+ (list python-xvfbwrapper)) ; needed for tests only
+ (inputs (list mpv))
+ (propagated-inputs (list python-pillow)) ; for raw screenshots
+ (home-page "https://github.com/jaseg/python-mpv")
+ (synopsis "Python interface to the mpv media player")
+ (description
+ "python-mpv is a ctypes-based python interface to the mpv media player.
+It gives you more or less full control of all features of the player, just
+as the lua interface does.")
+ ;; From the project's README:
+ ;; python-mpv inherits the underlying libmpv's license, which can be either
+ ;; GPLv2 or later (default) or LGPLv2.1 or later. For details, see the mpv
+ ;; copyright page.
+ (license (package-license mpv))))
+
(define-public python-biblib
(let ((upstream-version "0.1.0")
(commit "ab0e857b9198fe425ec9b02fcc293b5d9fd0c406")
--
2.37.1
next prev parent reply other threads:[~2022-08-14 12:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-27 18:57 [bug#56803] [PATCH 0/6] Add hydrus network and its dependencies Tomasz Jeneralczyk
2022-07-27 19:00 ` [bug#56803] [PATCH 1/6] gnu: Add swftools Tomasz Jeneralczyk
2022-07-27 19:00 ` [bug#56803] [PATCH 2/6] gnu: Add python-xvfbwrapper Tomasz Jeneralczyk
2022-07-27 19:00 ` [bug#56803] [PATCH 3/6] gnu: Add python-mpv Tomasz Jeneralczyk
2022-07-27 22:05 ` Maxime Devos
2022-07-28 14:58 ` Tomasz Jeneralczyk
2022-08-09 15:14 ` [bug#56803] [PATCH 0/6] Add hydrus network and its dependencies Ludovic Courtès
2022-08-13 14:34 ` Tomasz Jeneralczyk
2022-08-13 21:26 ` ( via Guix-patches via
2022-08-14 10:10 ` Tomasz Jeneralczyk
2022-08-14 10:11 ` ( via Guix-patches via
2022-08-09 16:59 ` [bug#56803] [PATCH 3/6] gnu: Add python-mpv Maxime Devos
2022-07-27 22:09 ` Maxime Devos
2022-07-27 19:00 ` [bug#56803] [PATCH 4/6] gnu: Add opencv-with-python Tomasz Jeneralczyk
2022-07-27 19:00 ` [bug#56803] [PATCH 5/6] gnu: Update python-cloudscraper Tomasz Jeneralczyk
2022-07-27 19:00 ` [bug#56803] [PATCH 6/6] gnu: Add hydrus-network Tomasz Jeneralczyk
2022-08-09 15:09 ` [bug#56803] [PATCH 0/6] Add hydrus network and its dependencies Ludovic Courtès
2022-08-14 12:46 ` [bug#56803] [PATCH v2 1/6] gnu: Add swftools Tomasz Jeneralczyk
2022-08-14 12:46 ` [bug#56803] [PATCH v2 2/6] gnu: Add python-xvfbwrapper Tomasz Jeneralczyk
2022-08-14 12:46 ` Tomasz Jeneralczyk [this message]
2022-08-14 12:46 ` [bug#56803] [PATCH v2 4/6] gnu: Add support for python in opencv Tomasz Jeneralczyk
2022-08-14 12:46 ` [bug#56803] [PATCH v2 5/6] gnu: Update python-cloudscraper Tomasz Jeneralczyk
2022-08-14 12:46 ` [bug#56803] [PATCH v2 6/6] gnu: Add hydrus-network Tomasz Jeneralczyk
2022-08-29 22:46 ` bug#56803: [PATCH 0/6] Add hydrus network and its dependencies Ludovic Courtès
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=08140eaac786e693cc7ac33208e4080650dcfb26.1660481045.git.tj@schwi.pl \
--to=tj@schwi.pl \
--cc=56803@debbugs.gnu.org \
/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).