diff options
author | Leo Famulari <leo@famulari.name> | 2016-03-03 20:06:19 -0500 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2016-03-18 14:27:16 -0400 |
commit | efe0b14369106561ae13a5de270fb922415c6237 (patch) | |
tree | af1811ad680883a1fe9ca1ee83e9941759df585c /gnu/packages/mpd.scm | |
parent | 76b94885348b20c79c49613c07a0e472d284a36b (diff) | |
download | guix-efe0b14369106561ae13a5de270fb922415c6237.tar.gz |
gnu: Add python-mpd2.
* gnu/packages/mpd.scm (python-mpd2, python2-mpd2): New variables.
Diffstat (limited to 'gnu/packages/mpd.scm')
-rw-r--r-- | gnu/packages/mpd.scm | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm index 5a6377224d..55c09bc897 100644 --- a/gnu/packages/mpd.scm +++ b/gnu/packages/mpd.scm @@ -28,6 +28,7 @@ #:use-module (guix download) #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (guix build-system python) #:use-module (gnu packages avahi) #:use-module (gnu packages boost) #:use-module (gnu packages icu4c) @@ -40,6 +41,7 @@ #:use-module (gnu packages mp3) #:use-module (gnu packages ncurses) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) #:use-module (gnu packages autotools) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages databases) @@ -240,3 +242,34 @@ information about tracks being played to a scrobbler, such as Libre.FM.") ;; instead. (home-page "http://mpd.wikia.com/wiki/Client:Mpdscribble") (license license:gpl2+))) + +(define-public python-mpd2 + (package + (name "python-mpd2") + (version "0.5.5") + (source (origin + (method url-fetch) + (uri (pypi-uri "python-mpd2" version)) + (sha256 + (base32 + "0laypd7h1j14b4vrmiayqlzdsh2j5hc3zv4l0fqvbrbw9y6763ii")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ (zero? (system* "python" "mpd_test.py"))))))) + (native-inputs `(("python-mock" ,python-mock))) + (home-page "https://github.com/Mic92/python-mpd2") + (synopsis "Python MPD client library") + (description "Python-mpd2 is a Python library which provides a client +interface for the Music Player Daemon.") + (license license:lgpl3+) + (properties `((python2-variant . ,(delay python2-mpd2)))))) + +(define-public python2-mpd2 + (let ((mpd2 (package-with-python2 + (strip-python2-variant python-mpd2)))) + (package (inherit mpd2) + (native-inputs `(("python2-setuptools" ,python2-setuptools) + ,@(package-native-inputs mpd2)))))) |