From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: Add matplotlib. Date: Sat, 29 Nov 2014 22:05:59 +0100 Message-ID: <877fydvhs8.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XupDZ-0005Wp-1U for guix-devel@gnu.org; Sat, 29 Nov 2014 16:06:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XupDT-0000we-B2 for guix-devel@gnu.org; Sat, 29 Nov 2014 16:06:12 -0500 Received: from hera.aquilenet.fr ([2a01:474::1]:43773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XupDN-0000vR-NU for guix-devel@gnu.org; Sat, 29 Nov 2014 16:06:07 -0500 In-Reply-To: (Federico Beffa's message of "Thu, 27 Nov 2014 20:32:25 +0100") 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: Federico Beffa Cc: Guix-devel Federico Beffa skribis: > For python2-matplotlib I've noticed a behavior that I do not > understand: matplotlib depends on numpydoc which I pushed yesterday > and appears not to be ready yet on hydra. If I build > python2-matplotlib with > > ./pre-inst-env guix build python2-matplotlib > > guix tells me that it will build among other packages > > /gnu/store/gjfrir5iykxwxicp9dxjv3adk5vpifb4-python2-numpydoc-0.5.drv > > However, the build process for this package fails, because a test > fails. Since I prepared the numpydoc package I know about this test > and know that the package includes the parameter #:tests? #f. > > In fact, if I explicitly build python2-numpydoc with > > ./pre-inst-env guix build python2-numpydoc > > it finished successfully (skipping the tests). > > The two ways of causing numpydoc to be built (direct and indirect) > generate two independent > > /gnu/store/...-python2-numpydoc-0.5-guile-builder > > The one generated by an explicit build command includes the #:tests? > #f flag as expected. However, the indirect one includes a #:tests? #t > flag! I'm confused. Am I missing something? What happens is that =E2=80=98package-with-python2=E2=80=99 automatically g= enerates python2 variants of the dependencies of the package you give it. So (package-with-python2 python-matplotlib) generates a package with an input that is exactly (package-with-python2 python-numpydoc), hence with #:tests? #t. The fix is to explicitly use the right python2-numpydoc, along the lines of: (define-public python2-matplotlib (let ((matplotlib (package-with-python2 python-matplotlib))) (package (inherit matplotlib) ;; Make sure we use exactly PYTHON2-NUMPYDOC, which is ;; customized for Python 2. (inputs `(("numpydoc" ,python2-numpydoc) ,@(alist-delete "numpydoc" (package-inputs matplotlib))))= ))) > + ;; FIX-ME: Add backends when available. Please write =E2=80=9CFIXME=E2=80=9D for easier grepping and highlighting. Otherwise the patch looks good to me, thanks for working on it! Ludo=E2=80=99.