unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: Christopher Baines <mail@cbaines.net>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 1/2] gnu: Add python-mpd2
Date: Thu, 18 Feb 2016 17:00:47 -0500	[thread overview]
Message-ID: <20160218220047.GA9390@jasmine> (raw)
In-Reply-To: <1455830814-4977-2-git-send-email-mail@cbaines.net>

[-- Attachment #1: Type: text/plain, Size: 1892 bytes --]

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
> 
> 

[-- Attachment #2: 0001-gnu-Add-python-mpd2.patch --]
[-- Type: text/x-diff, Size: 1933 bytes --]

From 03d428d2452a9a8b14e95e948939634cddcfd825 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
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


  reply	other threads:[~2016-02-18 22:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 21:26 [PATCH] Add sonata and python-mpd2 Christopher Baines
2016-02-18 21:26 ` [PATCH 1/2] gnu: Add python-mpd2 Christopher Baines
2016-02-18 22:00   ` Leo Famulari [this message]
2016-02-18 22:08     ` Christopher Baines
2016-02-18 22:51       ` Leo Famulari
2016-02-18 21:26 ` [PATCH 2/2] gnu: Add sonata Christopher Baines
2016-02-18 23:57   ` Leo Famulari
2016-02-20 11:18     ` Andreas Enge
2016-02-20 12:37       ` Leo Famulari
2016-02-20 18:49   ` Thompson, David
2016-02-29  7:18     ` Ricardo Wurmus
2016-09-10 11:31 ` [PATCH] " Christopher Baines
2016-09-10 11:31   ` Christopher Baines
2016-09-10 18:08     ` Leo Famulari
2016-09-11 10:00       ` Christopher Baines
2016-09-11 10:00         ` Christopher Baines
2016-09-11 15:08           ` Leo Famulari
2016-09-12 16:04             ` Thompson, David
2016-09-11 17:01           ` Alex Kost
2016-09-11 18:11             ` Leo Famulari
2016-09-11 18:34             ` Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160218220047.GA9390@jasmine \
    --to=leo@famulari.name \
    --cc=guix-devel@gnu.org \
    --cc=mail@cbaines.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).