From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH 4/5] gnu: Add python-libvirt. Date: Wed, 3 Aug 2016 17:46:02 +0200 Message-ID: <20160803154603.6939-5-rekado@elephly.net> References: <20160803154603.6939-1-rekado@elephly.net> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUyNM-0006n6-Om for guix-devel@gnu.org; Wed, 03 Aug 2016 11:46:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUyNI-00055N-IS for guix-devel@gnu.org; Wed, 03 Aug 2016 11:46:32 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:24380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUyNI-00054N-9g for guix-devel@gnu.org; Wed, 03 Aug 2016 11:46:28 -0400 In-Reply-To: <20160803154603.6939-1-rekado@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/qemu.scm (python-libvirt, python2-libvirt): New variables. --- gnu/packages/qemu.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/qemu.scm b/gnu/packages/qemu.scm index a577cd1..6c36815 100644 --- a/gnu/packages/qemu.scm +++ b/gnu/packages/qemu.scm @@ -48,6 +48,7 @@ #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml) #:use-module (guix build-system gnu) + #:use-module (guix build-system python) #:use-module (guix download) #:use-module ((guix licenses) #:select (gpl2 lgpl2.1+)) #:use-module (guix packages) @@ -365,3 +366,39 @@ three libraries: @end enumerate ") (license lgpl2.1+))) + +(define-public python-libvirt + (package + (name "python-libvirt") + (version "2.0.0") + (source (origin + (method url-fetch) + (uri (pypi-uri "libvirt-python" version)) + (sha256 + (base32 + "0h0x5lpsx97bvw20pzfcsdmmivximddq4qmn8fk0n55dqv0wn5kq")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-nosetests-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "setup.py" + (("sys.executable, \"/usr/bin/nosetests\"") + (string-append "\"" (which "bash") "\", \"" + (which "nosetests") "\""))) + #t))))) + (inputs + `(("libvirt" ,libvirt) + ("python-lxml" ,python-lxml))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python-nose" ,python-nose))) + (home-page "http://libvirt.org") + (synopsis "Python bindings to libvirt") + (description "This package provides Python bindings to the libvirt +virtualization library.") + (license lgpl2.1+))) + +(define-public python2-libvirt + (package-with-python2 python-libvirt)) -- 2.9.0