From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59651) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQiTU-0007rS-P2 for guix-patches@gnu.org; Fri, 01 Nov 2019 21:45:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQiTT-0001he-9J for guix-patches@gnu.org; Fri, 01 Nov 2019 21:45:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49038) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iQiTT-0001hK-5J for guix-patches@gnu.org; Fri, 01 Nov 2019 21:45:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iQiTT-00089T-1c for guix-patches@gnu.org; Fri, 01 Nov 2019 21:45:07 -0400 Subject: [bug#38029] [PATCH 15/80] gnu: Add python-dbusmock. Resent-Message-ID: From: Kei Kebreau Date: Fri, 1 Nov 2019 21:43:44 -0400 Message-Id: <20191102014348.3191-6-kkebreau@posteo.net> In-Reply-To: <20191102014348.3191-1-kkebreau@posteo.net> References: <20191102014348.3191-1-kkebreau@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 38029@debbugs.gnu.org Cc: Kei Kebreau * gnu/packages/python-xyz.scm (python-dbusmock): New variable. --- gnu/packages/python-xyz.scm | 40 ++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 10fe5ee553..56b43c73cd 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -41,7 +41,7 @@ ;;; Copyright © 2017, 2018 Mathieu Othacehe ;;; Copyright © 2017 José Miguel Sánchez García ;;; Copyright © 2017 Roel Janssen -;;; Copyright © 2017, 2018 Kei Kebreau +;;; Copyright © 2017, 2018, 2019 Kei Kebreau ;;; Copyright © 2017 Rutger Helling ;;; Copyright © 2017 Muriithi Frederick Muriuki ;;; Copyright © 2017, 2019 Brendan Tildesley @@ -102,6 +102,7 @@ #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) #:use-module (gnu packages graphviz) #:use-module (gnu packages graphics) #:use-module (gnu packages gstreamer) @@ -16487,3 +16488,40 @@ It is the recommended replacement for Python's original @code{distro} also provides a command-line interface to output the platform information in various formats.") (license license:asl2.0))) + +(define-public python-dbusmock + (package + (name "python-dbusmock") + (version "0.18.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "python-dbusmock" version)) + (sha256 + (base32 + "1hj02p65cic4jdc6a5xf1hx8j5icwy7dcrm5kg91lkjks4gwpg5h")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-/bin/sh + (lambda _ + (substitute* "tests/test_code.py" + (("/bin/sh") (which "sh"))) + #t))))) + (native-inputs + `(;; For tests. + ("dbus" ,dbus) ; for dbus-daemon + ("python-nose" ,python-nose) + ("which" ,which))) + (propagated-inputs + `(("python-dbus" ,python-dbus) + ("python-pygobject" ,python-pygobject))) + (home-page "https://github.com/martinpitt/python-dbusmock") + (synopsis "Python library for mock D-Bus objects") + (description "python-dbusmock allows for the easy creation of mock objects on +D-Bus. This is useful for writing tests for software which talks to D-Bus +services such as upower, systemd, logind, gnome-session or others, and it is +hard (or impossible without root privileges) to set the state of the real +services to what you expect in your tests.") + (license license:lgpl3+))) -- 2.23.0