mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-nbconvert: Use pyproject-build-system.
* gnu/packages/python-xyz.scm (python-nbconvert)[build-system]: Use pyproject-build-system. [native-inputs]: Add python-setuptools and python-wheel. [arguments]: Add phase 'ignore-deprecation-warnings; replace custom 'check phase with use of #:test-flags and 'pre-check phase; disable one test and set JUPYTER_PLATFORM_DIRS variable. Change-Id: I02bebe1ecc524efb335249199971c37d2b2982a5
This commit is contained in:
parent
e2fa754750
commit
8928764688
1 changed files with 36 additions and 25 deletions
|
@ -18045,9 +18045,25 @@ time.")
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"17g9xq4za7vvzml6l6d8zrzknhxsvgx02hymmsw9d1dygbi4cgi2"))))
|
"17g9xq4za7vvzml6l6d8zrzknhxsvgx02hymmsw9d1dygbi4cgi2"))))
|
||||||
(build-system python-build-system)
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
|
#:test-flags
|
||||||
|
'(list "--pyargs" "nbconvert"
|
||||||
|
"-k"
|
||||||
|
(string-append
|
||||||
|
;; These tests require pyppeteer, not yet
|
||||||
|
;; available in Guix.
|
||||||
|
"not test_webpdf_with_chromium"
|
||||||
|
" and not test_webpdf.py"
|
||||||
|
;; These tests require ipywidgets, which would
|
||||||
|
;; introduce a dependency cycle.
|
||||||
|
" and not test_execute_widgets_from_nbconvert"
|
||||||
|
" and not test_execute_multiple_notebooks"
|
||||||
|
|
||||||
|
;; This test calls nbconvert itself via "sys.executable -m
|
||||||
|
;; nbconvert". It's probably harmless.
|
||||||
|
" and not test_default_config"))
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'fix-paths
|
(add-after 'unpack 'fix-paths
|
||||||
|
@ -18067,29 +18083,22 @@ time.")
|
||||||
(("inkscape_path = which\\(\"inkscape\")")
|
(("inkscape_path = which\\(\"inkscape\")")
|
||||||
(format #f "inkscape_path = ~s"
|
(format #f "inkscape_path = ~s"
|
||||||
(search-input-file inputs "bin/inkscape"))))))
|
(search-input-file inputs "bin/inkscape"))))))
|
||||||
(replace 'check
|
(add-after 'unpack 'ignore-deprecation-warnings
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(lambda _
|
||||||
(when tests?
|
(substitute* "pyproject.toml"
|
||||||
;; Tests depend on templates installed to output.
|
(("\"ignore:nbconvert.utils" m)
|
||||||
(setenv "JUPYTER_PATH"
|
(string-append "\"ignore:zmq.eventloop.ioloop is deprecated:DeprecationWarning\",\n"
|
||||||
(string-append #$output "/share/jupyter:"
|
m)))))
|
||||||
(getenv "JUPYTER_PATH")))
|
(add-before 'check 'pre-check
|
||||||
;; Step outside of the source directory to avoid having both
|
(lambda _
|
||||||
;; the installed package *and* the package from the source on
|
;; Tests depend on templates installed to output.
|
||||||
;; Python's path.
|
(setenv "JUPYTER_PATH"
|
||||||
(with-directory-excursion "/tmp"
|
(string-append #$output "/share/jupyter:"
|
||||||
(invoke "pytest" "--pyargs" "nbconvert"
|
(getenv "JUPYTER_PATH")))
|
||||||
"-vv" "-n" (number->string (parallel-job-count))
|
;; jupyter-core demands this
|
||||||
"-k"
|
(setenv "JUPYTER_PLATFORM_DIRS" "1")
|
||||||
(string-append
|
;; Tests need a writable HOME.
|
||||||
;; These tests require pyppeteer, not yet
|
(setenv "HOME" "/tmp"))))))
|
||||||
;; available in Guix.
|
|
||||||
"not test_webpdf_with_chromium "
|
|
||||||
"and not test_webpdf.py "
|
|
||||||
;; These tests require ipywidgets, which would
|
|
||||||
;; introduce a dependency cycle.
|
|
||||||
"and not test_execute_widgets_from_nbconvert "
|
|
||||||
"and not test_execute_multiple_notebooks ")))))))))
|
|
||||||
(inputs
|
(inputs
|
||||||
(list inkscape/stable pandoc))
|
(list inkscape/stable pandoc))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
|
@ -18099,7 +18108,9 @@ time.")
|
||||||
;; XXX: Disabled, not in guix.
|
;; XXX: Disabled, not in guix.
|
||||||
;;python-pyppeteer
|
;;python-pyppeteer
|
||||||
python-pytest
|
python-pytest
|
||||||
python-pytest-xdist))
|
python-pytest-xdist
|
||||||
|
python-setuptools
|
||||||
|
python-wheel))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list python-beautifulsoup4
|
(list python-beautifulsoup4
|
||||||
python-bleach
|
python-bleach
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue