From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SOaaLDCO4WJ3ZAEAbAwnHQ (envelope-from ) for ; Wed, 27 Jul 2022 21:12:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SBySLDCO4WJhkAAA9RJhRA (envelope-from ) for ; Wed, 27 Jul 2022 21:12:48 +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 6CC4CBAA6 for ; Wed, 27 Jul 2022 21:12:48 +0200 (CEST) Received: from localhost ([::1]:37284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGmSd-0003A4-7j for larch@yhetil.org; Wed, 27 Jul 2022 15:12:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGmIN-0005Xx-9Q for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39041) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGmIE-0004Lb-7Y for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:10 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGmID-0005pM-VB for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56803] [PATCH 3/6] gnu: Add python-mpv. Resent-From: Tomasz Jeneralczyk Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Jul 2022 19:02:01 +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.165894846422262 (code B ref 56803); Wed, 27 Jul 2022 19:02:01 +0000 Received: (at 56803) by debbugs.gnu.org; 27 Jul 2022 19:01:04 +0000 Received: from localhost ([127.0.0.1]:57014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGmHH-0005mz-SE for submit@debbugs.gnu.org; Wed, 27 Jul 2022 15:01:04 -0400 Received: from outgoing1.lunanode.net ([172.81.176.235]:42907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGmHG-0005mR-36 for 56803@debbugs.gnu.org; Wed, 27 Jul 2022 15:01:02 -0400 Received: from mail2.lunanode.net (mail2.lunanode.net [158.69.21.179]) by outgoing1.lunanode.net (Postfix) with ESMTPS id C5D314005F for <56803@debbugs.gnu.org>; Wed, 27 Jul 2022 19:01:01 +0000 (UTC) From: Tomasz Jeneralczyk Date: Wed, 27 Jul 2022 21:00:25 +0200 Message-Id: <8dec60b4f6d340aa63e58ef1e7628d4d8801fc0b.1658946720.git.tj@schwi.pl> X-Mailer: git-send-email 2.37.1 In-Reply-To: References: 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=1658949168; 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=Q/lJV/0qbUsAwLy+0YGF3tTNC8jK2b3ZKraMD7z76fo=; b=m7QHz4TRphXgdN+nSOs75m0nMQYgD+XzHnKMYoIPDV1FCEldx2NXuX9uWAmatImq+nL2Lx l5bCPrBRnyeq7JwSaiN1cDaYIdTJ24udj4FTpNfLrit6aNjb3lwuJLS4CtL5h8vgfOIu7B 83tgoqA9jcgM1Ugjl1n/qAGRBZt9DBLnzdt5WhtxPxbHpss2bo0Twt+2PsiaLUGOf8Zwai pedNV+qzujmQxkV8skvodlv1TtfpEOWz6KuSeTxHbrTU1BuJ6mJi76Fl0w/q7+BArlsZyL RQnAC4X5zSlrBAkE2UwndMrEnBXI/TInMA9HGiY7jvESfDSvM9KRKTyEsxiIKw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658949168; a=rsa-sha256; cv=none; b=CB4uwMEzoaNp/IqXzehMGjp8etmghRBKpgu5CTPneIjaziq5zcPqILbsllKW2pYspiMyUT WnsRDID8EG2MvUr4Nxlpp18vb7l4m8cJiNcpEPY9pqtlyp9CmAur1mzKwCGt4k6pFNpPpD Ql/0h/RLHyLv+dTPfL4SFtpkXaFT+DzvYRZuUe7X0BiqFqSg4ebLxEt56KnCATMYsvIDph jFUnOo+sN06LQ7UoTS62OZ05fXi0QMAnDuSBNcS/FwlE/0NMD1oE8/RYW15fE3vX0cjuca p9e4G22no6QxbxOYkY9kzVKOgMS2AQMa3rvJUQxKsZyKcpMzVWEfcoP+/IW38Q== 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: -2.93 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: 6CC4CBAA6 X-Spam-Score: -2.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: aBt5hcc7+EZq 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 | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index ac7c0d6066..5bc40ecaea 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -124,6 +124,7 @@ ;;; Copyright © 2022 Artyom V. Poptsov ;;; Copyright © 2022 Paul A. Patience ;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ +;;; Copyright © 2022 Tomasz Jeneralczyk ;;; ;;; This file is part of GNU Guix. ;;; @@ -30203,3 +30204,64 @@ (define-public python-bsdiff4 binary diff utility. It also provides two command-line tools, @code{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 + (with-extensions (list mpv) + #~(begin + ;; Without an absolute path it is not able find and + ;; load the libmpv library. + (substitute* "mpv.py" + (("(sofile = )(.*)" _ pre post) + (string-append pre "\"" #$mpv "/lib/\" + " post))) + ;; 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 + (with-imported-modules '((guix build utils)) + #~(modify-phases %standard-phases + (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)))) + -- 2.37.1