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:51:07 -0500 Message-ID: <20160218225107.GD9390@jasmine> References: <1455830814-4977-1-git-send-email-mail@cbaines.net> <1455830814-4977-2-git-send-email-mail@cbaines.net> <20160218220047.GA9390@jasmine> <56C640CC.1080105@cbaines.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWXPn-0000Su-Ft for guix-devel@gnu.org; Thu, 18 Feb 2016 17:51:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWXPk-0001cY-AK for guix-devel@gnu.org; Thu, 18 Feb 2016 17:51:15 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:45404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWXPi-0001cJ-UF for guix-devel@gnu.org; Thu, 18 Feb 2016 17:51:12 -0500 Content-Disposition: inline In-Reply-To: <56C640CC.1080105@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 On Thu, Feb 18, 2016 at 10:08:12PM +0000, Christopher Baines wrote: > On 18/02/16 22:00, Leo Famulari wrote: > > 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? > > That's fine by me. > > >> + (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. > > From looking at the source, I think its only needed for running the > tests with python2.6 [1]. > > 1: > https://github.com/Mic92/python-mpd2/blob/6818984462552dbc7ca85d014f5cf9a8a1e81aec/mpd_test.py#L14 > > > 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. > > I though native inputs had something to do with architectures, which I > guess won't matter here, so why is it not just an input? The "native" part refers to the architecture of the build machine, which is important when cross-compiling. A side benefit is that end users shouldn't have to download native-inputs when substituting. In some cases, that can save a lot of bandwidth. So, we make build-time-only dependencies native-inputs. In practice, I've seen packages end up with references to native-inputs in their output, but that's not optimal. Semi-relevant discussion of the problems of propagated-inputs: http://lists.gnu.org/archive/html/guix-devel/2016-02/msg00810.html