From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eG8PJw7v+GIphQEAbAwnHQ (envelope-from ) for ; Sun, 14 Aug 2022 14:48:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 4BUpJw7v+GJ4iQAA9RJhRA (envelope-from ) for ; Sun, 14 Aug 2022 14:48:14 +0200 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 4337836A90 for ; Sun, 14 Aug 2022 14:48:14 +0200 (CEST) Received: from localhost ([::1]:54564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oND2L-0002YN-DI for larch@yhetil.org; Sun, 14 Aug 2022 08:48:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oND2B-0002Vz-PX for guix-patches@gnu.org; Sun, 14 Aug 2022 08:48:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46407) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oND2B-0005q4-Ga for guix-patches@gnu.org; Sun, 14 Aug 2022 08:48:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oND2B-0003HA-Cu for guix-patches@gnu.org; Sun, 14 Aug 2022 08:48:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56803] [PATCH v2 3/6] gnu: Add python-mpv. Resent-From: Tomasz Jeneralczyk Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 14 Aug 2022 12:48:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56803 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56803@debbugs.gnu.org Cc: Tomasz Jeneralczyk Received: via spool by 56803-submit@debbugs.gnu.org id=B56803.166048124112360 (code B ref 56803); Sun, 14 Aug 2022 12:48:03 +0000 Received: (at 56803) by debbugs.gnu.org; 14 Aug 2022 12:47:21 +0000 Received: from localhost ([127.0.0.1]:36145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oND1V-0003DH-15 for submit@debbugs.gnu.org; Sun, 14 Aug 2022 08:47:21 -0400 Received: from outgoing1.lunanode.net ([172.81.176.235]:56526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oND1Q-0003D0-FB for 56803@debbugs.gnu.org; Sun, 14 Aug 2022 08:47:18 -0400 Received: from mail1.lunanode.net (mail1.lunanode.net [170.75.162.243]) by outgoing1.lunanode.net (Postfix) with ESMTPS id 35A3C40011 for <56803@debbugs.gnu.org>; Sun, 14 Aug 2022 12:47:16 +0000 (UTC) From: Tomasz Jeneralczyk Date: Sun, 14 Aug 2022 14:46:20 +0200 Message-Id: <08140eaac786e693cc7ac33208e4080650dcfb26.1660481045.git.tj@schwi.pl> X-Mailer: git-send-email 2.37.1 In-Reply-To: <458d155cb6f630e0e8aea1793a4c97b3d76520e6.1660481045.git.tj@schwi.pl> References: <458d155cb6f630e0e8aea1793a4c97b3d76520e6.1660481045.git.tj@schwi.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660481294; 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: content-transfer-encoding:content-transfer-encoding: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=kFn7R1bHzTS3gpH2y1d3cv+dehnLoH6sYchk1aOqhPs=; b=eF9yX7GmQwzeargatv+Oktcrj7bpSWDVocpc2RHDdpIjNsSCTcDruKHNT9qYnHesAeqRlZ flarq6Bta3AYY7DGlBaxCJxgtUgOdZomoZMHUS9h+xl28sOeI+Swg9JeoFJFQBANZvapST J56L8CT3pPS1xJP07gmq3dheaZFsfZ2c4hwBI3ekRncHtYwFfNLlqygE9SimWurYZDnH0z TfF5TdeqUDoJzoxu7DPG1M1laexynKsJNxvc9OPLKg6SvMPhZirr7yp/U+yqq7+/MrpwrE UefnOtewjWL2lr7ZOx18sKx5LfRQbgfkvUFDgvFWr++Qa7eQ4B/Zl+MbDyM7cQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660481294; a=rsa-sha256; cv=none; b=fKoYQxEv7fY9dQfWZSI54KNC1HsqcdLni8iNvxXOXjKAcKull5DydV30sTA/WMeC0xTrU7 LMNmEF/laaMBSGsKzTarIyBfWxq1RoWtULUUGYn6c7i+M18zxBszyiXDeV9CXngOGUW4Hs CIUD+OlBQhqennFVNzO0thYX52oiL8/L1KXkjYZCnRVWrCOTYwI2QjGGojwlMLdprJ3CiS YxgxWvJwUHMn82XRz2JuvIKVlhREL6MIhG4HnFsYlvV7ykY+c5c9z7s68b47CIKFmun+Xa 3g6EhE6AoMz/9yVohe/BEpKTrL+G+9wnvXjZkr3JDIqf3jqJAS5ve9TnMiJIWA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.66 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 4337836A90 X-Spam-Score: -1.66 X-Migadu-Scanner: scn0.migadu.com X-TUID: h0ACxs0PJaCt 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 ;;; Copyright © 2022 Marek Felšöci ;;; Copyright © 2022 Hilton Chain +;;; Copyright © 2022 Tomasz Jeneralczyk ;;; ;;; 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