unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Federico Beffa <beffa@ieee.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] gnu: Add matplotlib.
Date: Sat, 29 Nov 2014 22:05:59 +0100	[thread overview]
Message-ID: <877fydvhs8.fsf@gnu.org> (raw)
In-Reply-To: <CAKrPhPNmR4t_D4C+2LWfAjZDM7Wzvr19XNr=ZC9k+bzKV0CEgg@mail.gmail.com> (Federico Beffa's message of "Thu, 27 Nov 2014 20:32:25 +0100")

Federico Beffa <beffa@ieee.org> 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 ‘package-with-python2’ automatically generates
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 “FIXME” for easier grepping and highlighting.

Otherwise the patch looks good to me, thanks for working on it!

Ludo’.

  reply	other threads:[~2014-11-29 21:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27 19:32 [PATCH] gnu: Add matplotlib Federico Beffa
2014-11-29 21:05 ` Ludovic Courtès [this message]
2014-11-30 16:01   ` Federico Beffa
2014-11-30 17:00     ` Ludovic Courtès

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=877fydvhs8.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=beffa@ieee.org \
    --cc=guix-devel@gnu.org \
    /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).