[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
28/46: gnu: python-nbconvert: Use pyproject-build-system.
From: |
guix-commits |
Subject: |
28/46: gnu: python-nbconvert: Use pyproject-build-system. |
Date: |
Tue, 7 May 2024 18:34:02 -0400 (EDT) |
rekado pushed a commit to branch python-team
in repository guix.
commit b67c75c98171bd128311b1b1c9482a268eb74755
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Mon May 6 23:06:53 2024 +0200
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
---
gnu/packages/python-xyz.scm | 61 ++++++++++++++++++++++++++-------------------
1 file changed, 36 insertions(+), 25 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8ab033d207..931f65ade6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17440,9 +17440,25 @@ time.")
(sha256
(base32
"17g9xq4za7vvzml6l6d8zrzknhxsvgx02hymmsw9d1dygbi4cgi2"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
(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
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-paths
@@ -17462,29 +17478,22 @@ time.")
(("inkscape_path = which\\(\"inkscape\")")
(format #f "inkscape_path = ~s"
(search-input-file inputs "bin/inkscape"))))))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- ;; Tests depend on templates installed to output.
- (setenv "JUPYTER_PATH"
- (string-append #$output "/share/jupyter:"
- (getenv "JUPYTER_PATH")))
- ;; Step outside of the source directory to avoid having both
- ;; the installed package *and* the package from the source on
- ;; Python's path.
- (with-directory-excursion "/tmp"
- (invoke "pytest" "--pyargs" "nbconvert"
- "-vv" "-n" (number->string (parallel-job-count))
- "-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 ")))))))))
+ (add-after 'unpack 'ignore-deprecation-warnings
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("\"ignore:nbconvert.utils" m)
+ (string-append "\"ignore:zmq.eventloop.ioloop is
deprecated:DeprecationWarning\",\n"
+ m)))))
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Tests depend on templates installed to output.
+ (setenv "JUPYTER_PATH"
+ (string-append #$output "/share/jupyter:"
+ (getenv "JUPYTER_PATH")))
+ ;; jupyter-core demands this
+ (setenv "JUPYTER_PLATFORM_DIRS" "1")
+ ;; Tests need a writable HOME.
+ (setenv "HOME" "/tmp"))))))
(inputs
(list inkscape/stable pandoc))
(native-inputs
@@ -17494,7 +17503,9 @@ time.")
;; XXX: Disabled, not in guix.
;;python-pyppeteer
python-pytest
- python-pytest-xdist))
+ python-pytest-xdist
+ python-setuptools
+ python-wheel))
(propagated-inputs
(list python-beautifulsoup4
python-bleach
- 14/46: gnu: python-attrs: Update to 23.2.0., (continued)
- 14/46: gnu: python-attrs: Update to 23.2.0., guix-commits, 2024/05/07
- 16/46: gnu: python-send2trash: Update to 1.8.2., guix-commits, 2024/05/07
- 17/46: gnu: python-argon2-cffi: Update to 21.1.0., guix-commits, 2024/05/07
- 18/46: gnu: python-jsonschema: Update to 4.22.0., guix-commits, 2024/05/07
- 19/46: gnu: python-websocket-client: Update to 1.8.0., guix-commits, 2024/05/07
- 20/46: gnu: python-prometheus-client: Update to 0.20.0., guix-commits, 2024/05/07
- 21/46: gnu: python-pytest-tornasync: Use Tornado 6., guix-commits, 2024/05/07
- 23/46: gnu: python-pyzmq: Use Tornado 6., guix-commits, 2024/05/07
- 24/46: gnu: python-jupyter-core: Update to 5.7.2., guix-commits, 2024/05/07
- 26/46: gnu: python-ipykernel: Set environment variable., guix-commits, 2024/05/07
- 28/46: gnu: python-nbconvert: Use pyproject-build-system.,
guix-commits <=
- 31/46: gnu: python-json-logger: Update to 2.0.7., guix-commits, 2024/05/07
- 39/46: gnu: python-openapi-schema-validator: Update to 0.6.2., guix-commits, 2024/05/07
- 45/46: gnu: Add python-jsonschema-path., guix-commits, 2024/05/07
- 22/46: gnu: python-jupyter-kernel-mgmt: Use Tornado 6., guix-commits, 2024/05/07
- 12/46: gnu: Add python-notebook-shim., guix-commits, 2024/05/07
- 37/46: gnu: python-jupyter-server-mathjax: Update to 0.2.6., guix-commits, 2024/05/07
- 40/46: gnu: python-pydata-sphinx-theme: Disable one test., guix-commits, 2024/05/07
- 42/46: gnu: python-requests: Update to 2.31.0., guix-commits, 2024/05/07
- 41/46: gnu: python-lazy-object-proxy: Update to 1.10.0., guix-commits, 2024/05/07
- 43/46: gnu: python-sparqlkernel: Patch install script., guix-commits, 2024/05/07