[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
90/361: gnu: python-nbconvert: Use pyproject-build-system.
From: |
guix-commits |
Subject: |
90/361: gnu: python-nbconvert: Use pyproject-build-system. |
Date: |
Thu, 21 Nov 2024 06:28:56 -0500 (EST) |
sharlatan pushed a commit to branch python-team
in repository guix.
commit e51d784682066f7e01d0aed8450a63ad3938e3f7
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 0a4bd73be7..e050a6b0c5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17956,9 +17956,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
@@ -17978,29 +17994,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
@@ -18010,7 +18019,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
- 27/361: gnu: python-lightning-cloud: Disable tests., (continued)
- 27/361: gnu: python-lightning-cloud: Disable tests., guix-commits, 2024/11/21
- 34/361: gnu: python-cleo: Update to 2.1.0., guix-commits, 2024/11/21
- 45/361: gnu: python-mistletoe: Add missing inputs., guix-commits, 2024/11/21
- 52/361: gnu: python-pyproject-metadata: Disable two tests., guix-commits, 2024/11/21
- 53/361: gnu: python-dbus-python: Add missing input., guix-commits, 2024/11/21
- 56/361: guix: toml: Fix parsing empty strings in arrays., guix-commits, 2024/11/21
- 74/361: gnu: Add python-notebook-shim., guix-commits, 2024/11/21
- 62/361: gnu: python-nbconvert: Add missing texlive inputs., guix-commits, 2024/11/21
- 66/361: gnu: Add python-jsonschema-specifications., guix-commits, 2024/11/21
- 58/361: gnu: python-pytest-xdist: Add setuptools and wheel., guix-commits, 2024/11/21
- 90/361: gnu: python-nbconvert: Use pyproject-build-system.,
guix-commits <=
- 87/361: gnu: python-jupyter-client: Set environment variable., guix-commits, 2024/11/21
- 73/361: gnu: Add python-pytest-jupyter., guix-commits, 2024/11/21
- 86/361: gnu: python-jupyter-core: Update to 5.7.2., guix-commits, 2024/11/21
- 80/361: gnu: python-jsonschema: Update to 4.22.0., guix-commits, 2024/11/21
- 67/361: gnu: Add python-rfc3986-validator., guix-commits, 2024/11/21
- 317/361: gnu: python-curio: Update to 1.6., guix-commits, 2024/11/21
- 341/361: gnu: python-pytest-localserver: Update to 0.9.0.post0., guix-commits, 2024/11/21
- 339/361: gnu: Add python-ephemeral-port-reserve., guix-commits, 2024/11/21
- 351/361: gnu: python-pytest-httpserver: Update to 1.1.0., guix-commits, 2024/11/21
- 92/361: gnu: python-jupyter-client: Update to 7.4.4., guix-commits, 2024/11/21