Patchwork [15/16] gnu: python-ipython: Update to 4.0.0.

login
register
mail settings
Submitter Ricardo Wurmus
Date Nov. 1, 2016, 12:20 p.m.
Message ID <20161101122046.751-16-ricardo.wurmus@mdc-berlin.de>
Download mbox | patch
Permalink /patch/17060/
State New
Headers show

Comments

Ricardo Wurmus - Nov. 1, 2016, 12:20 p.m.
* gnu/packages/python.scm (python-ipython): Update to 4.0.0.
  [inputs]: Keep only "readline" and "which"; move the remaining inputs
  to propagated-inputs, except for "python-requests" and "python-nose"
  which are moved to native-inputs.
  [propagated-inputs]: Add python-pexpect, python-pickleshare,
  python-simplegeneric, python-traitlets, python-ipykernel.
  [native-inputs]: Add "python-testpath".
  [arguments]: Enable building of HTML documentation.
---
 gnu/packages/python.scm | 36 ++++++++++++++++++++----------------
 1 file changed, 20 insertions(+), 16 deletions(-)
Roel Janssen - Nov. 1, 2016, 6:18 p.m.
Ricardo Wurmus writes:

> * gnu/packages/python.scm (python-ipython): Update to 4.0.0.
>   [inputs]: Keep only "readline" and "which"; move the remaining inputs
>   to propagated-inputs, except for "python-requests" and "python-nose"
>   which are moved to native-inputs.
>   [propagated-inputs]: Add python-pexpect, python-pickleshare,
>   python-simplegeneric, python-traitlets, python-ipykernel.
>   [native-inputs]: Add "python-testpath".
>   [arguments]: Enable building of HTML documentation.
> ---
>  gnu/packages/python.scm | 36 ++++++++++++++++++++----------------
>  1 file changed, 20 insertions(+), 16 deletions(-)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 519b93d..12d38f1 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -4628,34 +4628,38 @@ tools for mocking system commands and recording calls to those.")
>  (define-public python-ipython
>    (package
>      (name "python-ipython")
> -    (version "3.2.1")
> +    (version "4.0.0")
>      (source
>       (origin
>         (method url-fetch)
> -       (patches (search-patches "python-ipython-inputhook-ctype.patch"))
> -       (uri (string-append "https://pypi.python.org/packages/source/i/"
> -                           "ipython/ipython-" version ".tar.gz"))
> +       (uri (pypi-uri "ipython" version ".tar.gz"))

Nice!

>         (sha256
> -        (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
> +        (base32 "1npl8g6bfsff9j938ypx0q5fyzy2l8lp0jl8skjjj2zv0z27dlig"))))
>      (build-system python-build-system)
>      (outputs '("out" "doc"))
>      (propagated-inputs
>       `(("python-pyzmq" ,python-pyzmq)
> -       ("python-terminado" ,python-terminado)))
> -    (inputs
> -     `(("readline" ,readline)
> -       ("which" ,which)
> +       ("python-terminado" ,python-terminado)
>         ("python-matplotlib" ,python-matplotlib)
>         ("python-numpy" ,python-numpy)
>         ("python-numpydoc" ,python-numpydoc)
>         ("python-jinja2" ,python-jinja2)
>         ("python-mistune" ,python-mistune)
> +       ("python-pexpect" ,python-pexpect)
> +       ("python-pickleshare" ,python-pickleshare)
> +       ("python-simplegeneric" ,python-simplegeneric)
>         ("python-jsonschema" ,python-jsonschema)
> -       ("python-pygments" ,python-pygments)
> -       ("python-requests" ,python-requests) ;; for tests
> -       ("python-nose" ,python-nose)))
> +       ("python-traitlets" ,python-traitlets)
> +       ("python-ipykernel" ,python-ipykernel)
> +       ("python-pygments" ,python-pygments)))
> +    (inputs
> +     `(("readline" ,readline)
> +       ("which" ,which)))

I think it really is necessary to propagate these, isn't it?

>      (native-inputs
>       `(("pkg-config" ,pkg-config)
> +       ("python-requests" ,python-requests) ;; for tests
> +       ("python-testpath" ,python-testpath)
> +       ("python-nose" ,python-nose)
>         ("python-sphinx" ,python-sphinx)
>         ("texlive" ,texlive)
>         ("texinfo" ,texinfo)
> @@ -4674,13 +4678,13 @@ tools for mocking system commands and recording calls to those.")
>                     (examples (string-append doc "/examples")))
>                (setenv "LANG" "en_US.utf8")
>                (with-directory-excursion "docs"
> -                ;; FIXME: html and pdf fail to build
> -                ;; (system* "make" "html")
> -                ;; (system* "make" "pdf" "PAPER=a4")
> +                ;; FIXME: pdf fails to build
> +                ;;(system* "make" "pdf" "PAPER=a4")
> +                (system* "make" "html")

The last line isn't absolutely necessary to, but I it doesn't really
matter and I see why you'd want to not have a space there.
Nevertheless, you could shorten the patch by two lines if you feel like
doing so.. :)

>                  (system* "make" "info"))
>                (copy-recursively "docs/man" man1)
>                (copy-recursively "examples" examples)
> -              ;; (copy-recursively "docs/build/html" html)
> +              (copy-recursively "docs/build/html" html)
>                ;; (copy-file "docs/build/latex/ipython.pdf"
>                ;;            (string-append doc "/ipython.pdf"))
>                (mkdir-p info)

LGTM.

Kind regards,
Roel Janssen
Ricardo Wurmus - Nov. 4, 2016, 5:10 p.m.
Roel Janssen <roel@gnu.org> writes:

> Ricardo Wurmus writes:
>
>> * gnu/packages/python.scm (python-ipython): Update to 4.0.0.
>>   [inputs]: Keep only "readline" and "which"; move the remaining inputs
>>   to propagated-inputs, except for "python-requests" and "python-nose"
>>   which are moved to native-inputs.
>>   [propagated-inputs]: Add python-pexpect, python-pickleshare,
>>   python-simplegeneric, python-traitlets, python-ipykernel.
>>   [native-inputs]: Add "python-testpath".
>>   [arguments]: Enable building of HTML documentation.

I noticed that I also needed to delete the patch and report it here.
Also fixed the indentation.

>> +    (inputs
>> +     `(("readline" ,readline)
>> +       ("which" ,which)))
>
> I think it really is necessary to propagate these, isn't it?

Neither of these need propagation.  “readline” is checked for by
setup.py, and for “which” we have a build phase to embed the reference
to the “which” executable.

>>      (native-inputs
>>       `(("pkg-config" ,pkg-config)
>> +       ("python-requests" ,python-requests) ;; for tests
>> +       ("python-testpath" ,python-testpath)
>> +       ("python-nose" ,python-nose)
>>         ("python-sphinx" ,python-sphinx)
>>         ("texlive" ,texlive)
>>         ("texinfo" ,texinfo)
>> @@ -4674,13 +4678,13 @@ tools for mocking system commands and recording calls to those.")
>>                     (examples (string-append doc "/examples")))
>>                (setenv "LANG" "en_US.utf8")
>>                (with-directory-excursion "docs"
>> -                ;; FIXME: html and pdf fail to build
>> -                ;; (system* "make" "html")
>> -                ;; (system* "make" "pdf" "PAPER=a4")
>> +                ;; FIXME: pdf fails to build
>> +                ;;(system* "make" "pdf" "PAPER=a4")
>> +                (system* "make" "html")
>
> The last line isn't absolutely necessary to, but I it doesn't really
> matter and I see why you'd want to not have a space there.
> Nevertheless, you could shorten the patch by two lines if you feel like
> doing so.. :)

Are you saying that “make html” isn’t needed to build the html docs?  I
think it is.

~~ Ricardo
Roel Janssen - Nov. 4, 2016, 5:43 p.m.
Ricardo Wurmus writes:

> Roel Janssen <roel@gnu.org> writes:
>
>> Ricardo Wurmus writes:
>>
>>> * gnu/packages/python.scm (python-ipython): Update to 4.0.0.
>>>   [inputs]: Keep only "readline" and "which"; move the remaining inputs
>>>   to propagated-inputs, except for "python-requests" and "python-nose"
>>>   which are moved to native-inputs.
>>>   [propagated-inputs]: Add python-pexpect, python-pickleshare,
>>>   python-simplegeneric, python-traitlets, python-ipykernel.
>>>   [native-inputs]: Add "python-testpath".
>>>   [arguments]: Enable building of HTML documentation.
>
> I noticed that I also needed to delete the patch and report it here.
> Also fixed the indentation.
>
>>> +    (inputs
>>> +     `(("readline" ,readline)
>>> +       ("which" ,which)))
>>
>> I think it really is necessary to propagate these, isn't it?
>
> Neither of these need propagation.  “readline” is checked for by
> setup.py, and for “which” we have a build phase to embed the reference
> to the “which” executable.
>
>>>      (native-inputs
>>>       `(("pkg-config" ,pkg-config)
>>> +       ("python-requests" ,python-requests) ;; for tests
>>> +       ("python-testpath" ,python-testpath)
>>> +       ("python-nose" ,python-nose)
>>>         ("python-sphinx" ,python-sphinx)
>>>         ("texlive" ,texlive)
>>>         ("texinfo" ,texinfo)
>>> @@ -4674,13 +4678,13 @@ tools for mocking system commands and recording calls to those.")
>>>                     (examples (string-append doc "/examples")))
>>>                (setenv "LANG" "en_US.utf8")
>>>                (with-directory-excursion "docs"
>>> -                ;; FIXME: html and pdf fail to build
>>> -                ;; (system* "make" "html")
>>> -                ;; (system* "make" "pdf" "PAPER=a4")
>>> +                ;; FIXME: pdf fails to build
>>> +                ;;(system* "make" "pdf" "PAPER=a4")
>>> +                (system* "make" "html")
>>
>> The last line isn't absolutely necessary to, but I it doesn't really
>> matter and I see why you'd want to not have a space there.
>> Nevertheless, you could shorten the patch by two lines if you feel like
>> doing so.. :)
>
> Are you saying that “make html” isn’t needed to build the html docs?  I
> think it is.

No!  Sorry for the confusion, it isn't the last line I meant.. If you
would leave:
;; (system* "make" "pdf" "PAPER=a4")

like that, it saves two lines in the patch.

Kind regards,
Roel Janssen

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 519b93d..12d38f1 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -4628,34 +4628,38 @@  tools for mocking system commands and recording calls to those.")
 (define-public python-ipython
   (package
     (name "python-ipython")
-    (version "3.2.1")
+    (version "4.0.0")
     (source
      (origin
        (method url-fetch)
-       (patches (search-patches "python-ipython-inputhook-ctype.patch"))
-       (uri (string-append "https://pypi.python.org/packages/source/i/"
-                           "ipython/ipython-" version ".tar.gz"))
+       (uri (pypi-uri "ipython" version ".tar.gz"))
        (sha256
-        (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
+        (base32 "1npl8g6bfsff9j938ypx0q5fyzy2l8lp0jl8skjjj2zv0z27dlig"))))
     (build-system python-build-system)
     (outputs '("out" "doc"))
     (propagated-inputs
      `(("python-pyzmq" ,python-pyzmq)
-       ("python-terminado" ,python-terminado)))
-    (inputs
-     `(("readline" ,readline)
-       ("which" ,which)
+       ("python-terminado" ,python-terminado)
        ("python-matplotlib" ,python-matplotlib)
        ("python-numpy" ,python-numpy)
        ("python-numpydoc" ,python-numpydoc)
        ("python-jinja2" ,python-jinja2)
        ("python-mistune" ,python-mistune)
+       ("python-pexpect" ,python-pexpect)
+       ("python-pickleshare" ,python-pickleshare)
+       ("python-simplegeneric" ,python-simplegeneric)
        ("python-jsonschema" ,python-jsonschema)
-       ("python-pygments" ,python-pygments)
-       ("python-requests" ,python-requests) ;; for tests
-       ("python-nose" ,python-nose)))
+       ("python-traitlets" ,python-traitlets)
+       ("python-ipykernel" ,python-ipykernel)
+       ("python-pygments" ,python-pygments)))
+    (inputs
+     `(("readline" ,readline)
+       ("which" ,which)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
+       ("python-requests" ,python-requests) ;; for tests
+       ("python-testpath" ,python-testpath)
+       ("python-nose" ,python-nose)
        ("python-sphinx" ,python-sphinx)
        ("texlive" ,texlive)
        ("texinfo" ,texinfo)
@@ -4674,13 +4678,13 @@  tools for mocking system commands and recording calls to those.")
                    (examples (string-append doc "/examples")))
               (setenv "LANG" "en_US.utf8")
               (with-directory-excursion "docs"
-                ;; FIXME: html and pdf fail to build
-                ;; (system* "make" "html")
-                ;; (system* "make" "pdf" "PAPER=a4")
+                ;; FIXME: pdf fails to build
+                ;;(system* "make" "pdf" "PAPER=a4")
+                (system* "make" "html")
                 (system* "make" "info"))
               (copy-recursively "docs/man" man1)
               (copy-recursively "examples" examples)
-              ;; (copy-recursively "docs/build/html" html)
+              (copy-recursively "docs/build/html" html)
               ;; (copy-file "docs/build/latex/ipython.pdf"
               ;;            (string-append doc "/ipython.pdf"))
               (mkdir-p info)