all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
Cc: 28782-done@debbugs.gnu.org
Subject: bug#28782: [PATCH] gnu: Add python-jupyter-console as input to python-ipython.
Date: Thu, 12 Oct 2017 20:27:35 +0100	[thread overview]
Message-ID: <20171012202735.462934b2@cbaines.net> (raw)
In-Reply-To: <87efq9a26t.fsf@gnu.org>

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

On Wed, 11 Oct 2017 21:56:26 +0200
ludo@gnu.org (Ludovic Courtès) wrote:

> Hello,
> 
> Christopher Baines <mail@cbaines.net> skribis:
> 
> > This fixes running ipython console and ipython3 console.
> >
> > As python-ipython is an input to python-jupyter-console, depend on
> > a modified version of the package which doesn't have this input.
> >
> > * gnu/packages/python.scm (python-ipython)[propagated-inputs]: Add
> > a modified version of python-jupyter-console.  
> 
> [...]
> 
> > @@ -5851,6 +5851,31 @@ tools for mocking system commands and
> > recording calls to those.") ("python-numpy" ,python-numpy)
> >         ("python-numpydoc" ,python-numpydoc)
> >         ("python-jinja2" ,python-jinja2)
> > +       ("python-jupyter-console"
> > +        ;; The python-ipython and python-jupyter-console require
> > each
> > +        ;; other. To get the functionality in both packages
> > working, strip
> > +        ;; down the python-jupyter-console package when using it
> > as an input
> > +        ;; to python-ipython.
> > +        ,(package
> > +           (inherit python-jupyter-console)
> > +           (arguments
> > +            (substitute-keyword-arguments
> > +                (package-arguments python-jupyter-console)
> > +              ((#:phases phases)
> > +               `(modify-phases ,phases
> > +                  (add-after 'install 'delete-bin
> > +                    (lambda* (#:key outputs #:allow-other-keys)
> > +                      ;; Delete the bin files, to avoid conflicts
> > in profiles
> > +                      ;; where python-ipython and
> > python-jupyter-console are
> > +                      ;; both present.
> > +                      (delete-file-recursively
> > +                       (string-append
> > +                        (assoc-ref outputs "out") "/bin"))))))))
> > +           ;; Remove the python-ipython propagated input, to avoid
> > the cycle
> > +           (propagated-inputs
> > +            (remove (lambda (input)
> > +                      (string=? (car input) name))
> > +                    (package-propagated-inputs
> > python-jupyter-console)))))  
> 
> For clarity, perhaps we should declare the above as
> ‘python-jupyter-console-minimal’ (also with a ‘name’ field)?
> 
> Also, the (remove …) expression at the end can be rewritten as:
> 
>   (alist-delete name (package-propagated-inputs
> python-jupyter-console))
> 
> Otherwise LGTM, thanks!

Thanks for reviewing Ludo, I've made these changes and pushed :)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

      reply	other threads:[~2017-10-12 19:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11  9:06 [bug#28782] [PATCH] gnu: Add python-jupyter-console as input to python-ipython Christopher Baines
2017-10-11 19:56 ` Ludovic Courtès
2017-10-12 19:27   ` Christopher Baines [this message]

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

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

  git send-email \
    --in-reply-to=20171012202735.462934b2@cbaines.net \
    --to=mail@cbaines.net \
    --cc=28782-done@debbugs.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.