gnu: python-nbconvert: Update to 6.0.7.

* gnu/packages/python-xyz.scm (python-nbconvert): Update to 6.0.7.
[arguments]: Remove configure flags, enable tests, override check phase.
[propagated-inputs]: Add python-defusedxml, python-nbclient,
python-pandocfilters, python-jupyterlab-pygments, and python-testpath.
[properties]: Add python2-variant.
(python2-nbconvert): Override version, source, arguments, and
propagated-inputs.
This commit is contained in:
Ricardo Wurmus 2021-04-13 08:35:46 +02:00
parent 74d2d7a322
commit f4af353cb2
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -151,6 +151,7 @@ (define-module (gnu packages python-xyz)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages jupyter)
#:use-module (gnu packages kerberos)
#:use-module (gnu packages libevent)
#:use-module (gnu packages libffi)
@ -10362,36 +10363,57 @@ (define-public python-simpleeval
(define-public python-nbconvert
(package
(name "python-nbconvert")
(version "5.0.0b1")
(version "6.0.7")
(source
(origin
(method url-fetch)
(uri (pypi-uri "nbconvert" version))
(sha256
(base32
"0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
"00lhqaxn481qvk2w5568asqlsnvrw2fm61p1vssx3m7vdnl17g6b"))))
(build-system python-build-system)
(arguments
`(;; The "bdist_egg" target is disabled by default, causing the installation
;; to fail.
#:configure-flags (list "bdist_egg")
;; FIXME: 5 failures, 40 errors.
#:tests? #f))
;; #:phases
;; (modify-phases %standard-phases
;; (replace 'check
;; (lambda _
;; (zero? (system* "py.test" "-v")))))
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
(when tests?
(add-installed-pythonpath inputs outputs)
;; This seems to require Chromium.
(delete-file "nbconvert/exporters/tests/test_webpdf.py")
;; This depends on the python3 kernel, which is provided by a
;; package that depends on nbconvert.
(delete-file "nbconvert/preprocessors/tests/test_execute.py")
;; Most of these tests fail because nbconvert fails to execute
;; itself.
(delete-file "nbconvert/tests/test_nbconvertapp.py")
;; One test here fails with an unclear error. It looks like
;; "%%pylabprint" is supposed to be expanded to some other
;; code, but isn't.
(delete-file "nbconvert/filters/tests/test_strings.py")
;; Some tests need HOME
(setenv "HOME" "/tmp")
(invoke "pytest")))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(propagated-inputs
`(("python-bleach" ,python-bleach)
("python-defusedxml" ,python-defusedxml)
("python-entrypoints" ,python-entrypoints)
("python-jinja2" ,python-jinja2)
("python-jupyter-core" ,python-jupyter-core)
("python-mistune" ,python-mistune)
("python-nbclient" ,python-nbclient)
("python-nbformat" ,python-nbformat)
("python-pandocfilters" ,python-pandocfilters)
("python-pygments" ,python-pygments)
("python-jupyterlab-pygments" ,python-jupyterlab-pygments)
("python-testpath" ,python-testpath)
("python-traitlets" ,python-traitlets)))
(home-page "https://jupyter.org")
(synopsis "Converting Jupyter Notebooks")
@ -10408,10 +10430,38 @@ (define-public python-nbconvert
@item ReStructured Text (rst)
@item executable script
@end enumerate\n")
(license license:bsd-3)))
(license license:bsd-3)
(properties `((python2-variant . ,(delay python2-nbconvert))))))
(define-public python2-nbconvert
(package-with-python2 python-nbconvert))
(let ((parent
(package-with-python2
(strip-python2-variant python-nbconvert))))
(package
(inherit parent)
(version "5.0.0b1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "nbconvert" version))
(sha256
(base32
"0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
(arguments
`(;; The "bdist_egg" target is disabled by default, causing the installation
;; to fail.
#:configure-flags (list "bdist_egg")
;; FIXME: 5 failures, 40 errors.
#:tests? #f))
(propagated-inputs
`(("python-bleach" ,python-bleach)
("python-entrypoints" ,python-entrypoints)
("python-jinja2" ,python-jinja2)
("python-jupyter-core" ,python-jupyter-core)
("python-mistune" ,python-mistune)
("python-nbformat" ,python-nbformat)
("python-pygments" ,python-pygments)
("python-traitlets" ,python-traitlets))))))
(define-public python-notebook
(package