From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2N7n-0002HK-NG for guix-patches@gnu.org; Wed, 11 Oct 2017 15:57:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2N7m-0001Lg-Mh for guix-patches@gnu.org; Wed, 11 Oct 2017 15:57:03 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:54064) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e2N7m-0001Lc-J9 for guix-patches@gnu.org; Wed, 11 Oct 2017 15:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e2N7m-0006IW-Af for guix-patches@gnu.org; Wed, 11 Oct 2017 15:57:02 -0400 Subject: [bug#28782] [PATCH] gnu: Add python-jupyter-console as input to python-ipython. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20171011090624.11181-1-mail@cbaines.net> Date: Wed, 11 Oct 2017 21:56:26 +0200 In-Reply-To: <20171011090624.11181-1-mail@cbaines.net> (Christopher Baines's message of "Wed, 11 Oct 2017 10:06:24 +0100") Message-ID: <87efq9a26t.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Christopher Baines Cc: 28782@debbugs.gnu.org Hello, Christopher Baines skribis: > This fixes running ipython console and ipython3 console. > > As python-ipython is an input to python-jupyter-console, depend on a modi= fied > version of the package which doesn't have this input. > > * gnu/packages/python.scm (python-ipython)[propagated-inputs]: Add a modi= fied > version of python-jupyter-console. [...] > @@ -5851,6 +5851,31 @@ tools for mocking system commands and recording ca= lls 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, str= ip > + ;; down the python-jupyter-console package when using it as an i= nput > + ;; 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 pro= files > + ;; 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 c= ycle > + (propagated-inputs > + (remove (lambda (input) > + (string=3D? (car input) name)) > + (package-propagated-inputs python-jupyter-console)))= )) For clarity, perhaps we should declare the above as =E2=80=98python-jupyter-console-minimal=E2=80=99 (also with a =E2=80=98name= =E2=80=99 field)? Also, the (remove =E2=80=A6) expression at the end can be rewritten as: (alist-delete name (package-propagated-inputs python-jupyter-console)) Otherwise LGTM, thanks! Ludo=E2=80=99.