aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorKei Kebreau <kkebreau@posteo.net>2019-07-26 08:31:17 -0400
committerKei Kebreau <kkebreau@posteo.net>2019-12-07 14:04:10 -0500
commite2ebbbccbc95ac2cd7d1eb8c3ebf10c017f5928d (patch)
tree74dc9a127df4fe9e7758ceab5c6d6bba4c584503 /gnu/packages
parent4be0719f921a1d60f3ca6ad821e53b81d3b9353c (diff)
downloadpatches-e2ebbbccbc95ac2cd7d1eb8c3ebf10c017f5928d.tar
patches-e2ebbbccbc95ac2cd7d1eb8c3ebf10c017f5928d.tar.gz
gnu: Add python-dbusmock.
* gnu/packages/python-xyz.scm (python-dbusmock): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python-xyz.scm40
1 files changed, 39 insertions, 1 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9dd97a61bd..10884bc205 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -41,7 +41,7 @@
;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
+;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
@@ -103,6 +103,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)
@@ -16711,3 +16712,40 @@ converters and more, those based on the library itself.")
"This package provides a parser, schema validator, and data binding tool
for YAML and JSON.")
(license license:expat)))
+
+(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+)))