From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: [PATCH 1/2] gnu: Add python-mpd2 Date: Thu, 18 Feb 2016 17:00:47 -0500 Message-ID: <20160218220047.GA9390@jasmine> References: <1455830814-4977-1-git-send-email-mail@cbaines.net> <1455830814-4977-2-git-send-email-mail@cbaines.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="tKW2IUtsqtDRztdT" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWWd5-0002HK-3L for guix-devel@gnu.org; Thu, 18 Feb 2016 17:00:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWWd1-0007ha-1K for guix-devel@gnu.org; Thu, 18 Feb 2016 17:00:55 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:53797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWWd0-0007hU-ST for guix-devel@gnu.org; Thu, 18 Feb 2016 17:00:50 -0500 Content-Disposition: inline In-Reply-To: <1455830814-4977-2-git-send-email-mail@cbaines.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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Christopher Baines Cc: guix-devel@gnu.org --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 18, 2016 at 09:26:53PM +0000, Christopher Baines wrote: > * gnu/packages/python.scm (python-mpd2): New variable > * gnu/packages/python.scm Import lgpl3. I actually have a patch for this in a WIP tree (attached). Based on the differences, and the fact that I have already made the changes requested below, I think my version of the patch should be used. My patch also adds a python-2 version; when possible, it's preferred to add both versions. What do you think? [...] > +(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")))) I'm glad to see we concur on this. > + (build-system python-build-system) > + (arguments > + `(#:phases > + (alist-replace > + 'check > + (lambda _ (zero? (system* "python" "mpd_test.py"))) > + %standard-phases))) > + (inputs > + `(("python-setuptools" ,python-setuptools) > + ("python-mock" ,python-mock) > + ("python-unittest2" ,python-unittest2))) I don't believe that unittest2 is needed. I can build both python-variants without it. Setuptools is only needed for the python2-variant. And, I think mock is only needed at build-time, so it would be a native-input. > + (home-page > + "https://github.com/Mic92/python-mpd2") > + (synopsis "Python MPD client library") > + (description "A Python MPD client library") Generally descriptions should be more descriptive than the synopsis. > + (license lgpl3))) I believe the license is lgpl3+, based on the "or later version" in mpd.py. > + > + > (define-public python-setuptools > (package > (name "python-setuptools") > -- > 2.7.0 > > --tKW2IUtsqtDRztdT Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-Add-python-mpd2.patch" >From 03d428d2452a9a8b14e95e948939634cddcfd825 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 15 Feb 2016 04:33:49 -0500 Subject: [PATCH] gnu: Add python-mpd2. * gnu/packages/python.scm (python-mpd2, python2-mpd2): New * variables. * gnu/packages/patches/python-mpd2-tests.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. --- gnu/packages/python.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 8a44de9..7acb766 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -7821,3 +7821,34 @@ comparing Windows paths ignores casing. (define-public python2-pathlib (package-with-python2 python-pathlib)) + +(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 "A Python MPD client library") + (description "Python-mpd2 is a Python library which provides a client +interface for the Music Player Daemon.") + (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)))))) -- 2.6.3 --tKW2IUtsqtDRztdT--