diff options
author | Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> | 2019-06-18 14:15:19 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2019-06-18 14:22:26 +0200 |
commit | 8b5f756ccbdd680926b5cce05d66c87b4042d0b4 (patch) | |
tree | 112a31858a183f9088391d31167602877a4aadb6 | |
parent | 82110deadb52d5ae56eb177fde40fbe2caae95cf (diff) | |
download | patches-8b5f756ccbdd680926b5cce05d66c87b4042d0b4.tar patches-8b5f756ccbdd680926b5cce05d66c87b4042d0b4.tar.gz |
gnu: python-ipython: Update to 7.5.0
* gnu/packages/python-xyz.scm (python2-ipython): Do not inherit from
python-ipython.
[outputs]: Remove separate "doc" output.
[native-inputs]: Remove python-sphinx, python-sphinx-rtd-theme, texinfo, and
the texlive-union consisting of texlive-fonts-amsfonts, texlive-fonts-ec,
texlive-generic-ifxetex, texlive-generic-pdftex, texlive-latex-amsfonts,
texlive-latex-capt-of, texlive-latex-cmap, texlive-latex-environ,
texlive-latex-eqparbox, texlive-latex-etoolbox, texlive-latex-expdlist,
texlive-latex-fancyhdr, texlive-latex-fancyvrb, texlive-latex-fncychap,
texlive-latex-float, texlive-latex-framed, texlive-latex-geometry,
texlive-latex-graphics, texlive-latex-hyperref, texlive-latex-mdwtools,
texlive-latex-multirow, texlive-latex-oberdiek, texlive-latex-parskip,
texlive-latex-preview, texlive-latex-tabulary, texlive-latex-threeparttable,
texlive-latex-titlesec, texlive-latex-trimspaces, texlive-latex-ucs,
texlive-latex-upquote, texlive-latex-url, texlive-latex-varwidth, and
texlive-latex-wrapfig.
[arguments]: Remove "install-doc" phase; rename "fix-tests" phase to
"delete-broken-tests" and adjust.
(python-ipython): Update to 7.5.0.
[outputs]: Remove separate "doc" output.
[propagated-inputs]: Add python-backcall and python-jedi; replace
python-prompt-toolkit-1 with python-prompt-toolkit.
[native-inputs]: Remove python-sphinx, python-sphinx-rtd-theme, texinfo, and
the texlive-union consisting of texlive-fonts-amsfonts, texlive-fonts-ec,
texlive-generic-ifxetex, texlive-generic-pdftex, texlive-latex-amsfonts,
texlive-latex-capt-of, texlive-latex-cmap, texlive-latex-environ,
texlive-latex-eqparbox, texlive-latex-etoolbox, texlive-latex-expdlist,
texlive-latex-fancyhdr, texlive-latex-fancyvrb, texlive-latex-fncychap,
texlive-latex-float, texlive-latex-framed, texlive-latex-geometry,
texlive-latex-graphics, texlive-latex-hyperref, texlive-latex-mdwtools,
texlive-latex-multirow, texlive-latex-oberdiek, texlive-latex-parskip,
texlive-latex-preview, texlive-latex-tabulary, texlive-latex-threeparttable,
texlive-latex-titlesec, texlive-latex-trimspaces, texlive-latex-ucs,
texlive-latex-upquote, texlive-latex-url, texlive-latex-varwidth, and
texlive-latex-wrapfig.
[arguments]: Remove "install-doc" phase; simplify "fix-tests" phase.
[properties]: Remove.
(python-ipython-documentation): New variable.
-rw-r--r-- | gnu/packages/python-xyz.scm | 245 |
1 files changed, 150 insertions, 95 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 0dd761cb3a..aca8a140e7 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -5117,10 +5117,10 @@ callback signature using a prototype function.") ;; This is the latest release of the LTS version of ipython with support for ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have -;; dropped support for Python 2.7. We may want to rename this package. -(define-public python-ipython +;; dropped support for Python 2.7. +(define-public python2-ipython (package - (name "python-ipython") + (name "python2-ipython") (version "5.8.0") (source (origin @@ -5129,14 +5129,75 @@ callback signature using a prototype function.") (sha256 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b")))) (build-system python-build-system) - (outputs '("out" "doc")) (propagated-inputs - `(("python-pyzmq" ,python-pyzmq) - ("python-prompt-toolkit" ,python-prompt-toolkit-1) + `(("python2-backports-shutil-get-terminal-size" + ,python2-backports-shutil-get-terminal-size) + ("python2-pathlib2" ,python2-pathlib2) + ("python2-pyzmq" ,python2-pyzmq) + ("python2-prompt-toolkit" ,python2-prompt-toolkit-1) + ("python2-terminado" ,python2-terminado) + ("python2-matplotlib" ,python2-matplotlib) + ("python2-numpy" ,python2-numpy) + ("python2-numpydoc" ,python2-numpydoc) + ("python2-jinja2" ,python2-jinja2) + ("python2-mistune" ,python2-mistune) + ("python2-pexpect" ,python2-pexpect) + ("python2-pickleshare" ,python2-pickleshare) + ("python2-simplegeneric" ,python2-simplegeneric) + ("python2-jsonschema" ,python2-jsonschema) + ("python2-traitlets" ,python2-traitlets) + ("python2-nbformat" ,python2-nbformat) + ("python2-pygments" ,python2-pygments))) + (inputs + `(("readline" ,readline) + ("which" ,which))) + (native-inputs + `(("graphviz" ,graphviz) + ("pkg-config" ,pkg-config) + ("python2-requests" ,python2-requests) ;; for tests + ("python2-testpath" ,python2-testpath) + ("python2-mock" ,python2-mock) + ("python2-nose" ,python2-nose))) + (arguments + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + (add-before 'check 'delete-broken-tests + (lambda* (#:key inputs #:allow-other-keys) + ;; These tests throw errors for unknown reasons. + (delete-file "IPython/core/tests/test_profile.py") + (delete-file "IPython/core/tests/test_interactiveshell.py") + (delete-file "IPython/core/tests/test_magic.py") + #t))))) + (home-page "https://ipython.org") + (synopsis "IPython is a tool for interactive computing in Python") + (description + "IPython provides a rich architecture for interactive computing with: +Powerful interactive shells, a browser-based notebook, support for interactive +data visualization, embeddable interpreters and tools for parallel +computing.") + (license license:bsd-3))) + +(define-public python-ipython + (package + (name "python-ipython") + (version "7.5.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "ipython" version ".tar.gz")) + (sha256 + (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78")))) + (build-system python-build-system) + (propagated-inputs + `(("python-backcall" ,python-backcall) + ("python-pyzmq" ,python-pyzmq) + ("python-prompt-toolkit" ,python-prompt-toolkit) ("python-terminado" ,python-terminado) ("python-matplotlib" ,python-matplotlib) ("python-numpy" ,python-numpy) ("python-numpydoc" ,python-numpydoc) + ("python-jedi" ,python-jedi) ("python-jinja2" ,python-jinja2) ("python-mistune" ,python-mistune) ("python-pexpect" ,python-pexpect) @@ -5154,74 +5215,10 @@ callback signature using a prototype function.") ("pkg-config" ,pkg-config) ("python-requests" ,python-requests) ;; for tests ("python-testpath" ,python-testpath) - ("python-nose" ,python-nose) - ("python-sphinx" ,python-sphinx) - ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme) - ;; FIXME: It's possible that a smaller union would work just as well. - ("texlive" ,(texlive-union (list texlive-fonts-amsfonts - texlive-fonts-ec - texlive-generic-ifxetex - texlive-generic-pdftex - texlive-latex-amsfonts - texlive-latex-capt-of - texlive-latex-cmap - texlive-latex-environ - texlive-latex-eqparbox - texlive-latex-etoolbox - texlive-latex-expdlist - texlive-latex-fancyhdr - texlive-latex-fancyvrb - texlive-latex-fncychap - texlive-latex-float - texlive-latex-framed - texlive-latex-geometry - texlive-latex-graphics - texlive-latex-hyperref - texlive-latex-mdwtools - texlive-latex-multirow - texlive-latex-oberdiek - texlive-latex-parskip - texlive-latex-preview - texlive-latex-tabulary - texlive-latex-threeparttable - texlive-latex-titlesec - texlive-latex-trimspaces - texlive-latex-ucs - texlive-latex-upquote - texlive-latex-url - texlive-latex-varwidth - texlive-latex-wrapfig))) - ("texinfo" ,texinfo))) + ("python-nose" ,python-nose))) (arguments `(#:phases (modify-phases %standard-phases - (add-after 'install 'install-doc - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) - (doc (string-append data "/doc/" ,name "-" ,version)) - (html (string-append doc "/html")) - (man1 (string-append data "/man/man1")) - (info (string-append data "/info")) - (examples (string-append doc "/examples")) - (python-arg (string-append "PYTHON=" (which "python")))) - (setenv "LANG" "en_US.utf8") - ;; Make installed package available for running the tests - (add-installed-pythonpath inputs outputs) - (with-directory-excursion "docs" - ;; FIXME: pdf fails to build - ;;(system* "make" "pdf" "PAPER=a4") - (system* "make" python-arg "html") - (system* "make" python-arg "info")) - (copy-recursively "docs/man" man1) - (copy-recursively "examples" examples) - (copy-recursively "docs/build/html" html) - ;; (copy-file "docs/build/latex/ipython.pdf" - ;; (string-append doc "/ipython.pdf")) - (mkdir-p info) - (copy-file "docs/build/texinfo/ipython.info" - (string-append info "/ipython.info")) - (copy-file "COPYING.rst" (string-append doc "/COPYING.rst"))) - #t)) ;; Tests can only be run after the library has been installed and not ;; within the source directory. (delete 'check) @@ -5244,19 +5241,11 @@ callback signature using a prototype function.") (substitute* "./IPython/core/tests/test_inputtransformer.py" (("#!/usr/bin/env python") (string-append "#!" (which "python")))) - ;; Disable 1 failing test - (substitute* "./IPython/core/tests/test_magic.py" - (("def test_dirops\\(\\):" all) - (string-append "@dec.skipif(True)\n" all))) ;; This test introduces a circular dependency on ipykernel ;; (which depends on ipython). (delete-file "IPython/core/tests/test_display.py") - ;; These tests throw errors for unknown reasons. - (delete-file "IPython/extensions/tests/test_storemagic.py") - (delete-file "IPython/core/tests/test_displayhook.py") + ;; AttributeError: module 'IPython.core' has no attribute 'formatters' (delete-file "IPython/core/tests/test_interactiveshell.py") - (delete-file "IPython/core/tests/test_pylabtools.py") - (delete-file "IPython/core/tests/test_paths.py") #t))))) (home-page "https://ipython.org") (synopsis "IPython is a tool for interactive computing in Python") @@ -5265,22 +5254,88 @@ callback signature using a prototype function.") Powerful interactive shells, a browser-based notebook, support for interactive data visualization, embeddable interpreters and tools for parallel computing.") - (license license:bsd-3) - (properties `((python2-variant . ,(delay python2-ipython)))))) + (license license:bsd-3))) -(define-public python2-ipython - (let ((ipython (package-with-python2 (strip-python2-variant python-ipython)))) - (package - (inherit ipython) - ;; FIXME: add pyreadline once available. - (propagated-inputs - `(("python2-backports-shutil-get-terminal-size" - ,python2-backports-shutil-get-terminal-size) - ("python2-pathlib2" ,python2-pathlib2) - ,@(package-propagated-inputs ipython))) - (native-inputs - `(("python2-mock" ,python2-mock) - ,@(package-native-inputs ipython)))))) +(define-public python-ipython-documentation + (package + (inherit python-ipython) + (name "python-ipython-documentation") + (version (package-version python-ipython)) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'build) + (delete 'check) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((data (string-append (assoc-ref outputs "out") "/share")) + (doc (string-append data "/doc/" ,name "-" ,version)) + (html (string-append doc "/html")) + (man1 (string-append data "/man/man1")) + (info (string-append data "/info")) + (examples (string-append doc "/examples")) + (python-arg (string-append "PYTHON=" (which "python")))) + (setenv "LANG" "en_US.utf8") + (with-directory-excursion "docs" + ;; FIXME: pdf fails to build + ;;(system* "make" "pdf" "PAPER=a4") + (system* "make" python-arg "html") + ;; FIXME: the generated texi file contains ^@^@, which trips + ;; up the parser. + ;; (system* "make" python-arg "info") + ) + (copy-recursively "docs/man" man1) + (copy-recursively "examples" examples) + (copy-recursively "docs/build/html" html) + ;; (copy-file "docs/build/latex/ipython.pdf" + ;; (string-append doc "/ipython.pdf")) + (mkdir-p info) + ;; (copy-file "docs/build/texinfo/ipython.info" + ;; (string-append info "/ipython.info")) + (copy-file "COPYING.rst" (string-append doc "/COPYING.rst"))) + #t))))) + (inputs + `(("python-ipython" ,python-ipython) + ("python-ipykernel" ,python-ipykernel))) + (native-inputs + `(("python-sphinx" ,python-sphinx) + ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme) + ;; FIXME: It's possible that a smaller union would work just as well. + ("texlive" ,(texlive-union (list texlive-fonts-amsfonts + texlive-fonts-ec + texlive-generic-ifxetex + texlive-generic-pdftex + texlive-latex-amsfonts + texlive-latex-capt-of + texlive-latex-cmap + texlive-latex-environ + texlive-latex-eqparbox + texlive-latex-etoolbox + texlive-latex-expdlist + texlive-latex-fancyhdr + texlive-latex-fancyvrb + texlive-latex-fncychap + texlive-latex-float + texlive-latex-framed + texlive-latex-geometry + texlive-latex-graphics + texlive-latex-hyperref + texlive-latex-mdwtools + texlive-latex-multirow + texlive-latex-needspace + texlive-latex-oberdiek + texlive-latex-parskip + texlive-latex-preview + texlive-latex-tabulary + texlive-latex-threeparttable + texlive-latex-titlesec + texlive-latex-trimspaces + texlive-latex-ucs + texlive-latex-upquote + texlive-latex-url + texlive-latex-varwidth + texlive-latex-wrapfig))) + ("texinfo" ,texinfo))))) (define-public python-urwid (package |