From 23a0d03ed11518696ac49d74039fa2c4a30bbd56 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Thu, 28 Nov 2024 21:16:00 +0000 Subject: [PATCH] gnu: python-jupytext: Move to pyproject-build-system. * gnu/packages/python-xyz.scm (python-jupytext): [build-system]: Move to pyproject-build-system. [arguments]<#:test-flags>: Add flags. Add a flag to ignore pre_commit tests. <#:phases>: Remove 'check phase replacement. Signed-off-by: Sharlatan Hellseher Change-Id: I465bf1e117fc9b4cb457c24c2ed2b41cdee30968 --- gnu/packages/python-xyz.scm | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 129609592cca2ed71be9d1b0dc8c1d85f4283619..e63ee24b79dcff3f3148fdb9f1ef95f847bf1748 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -543,26 +543,24 @@ design}.") (file-name (git-file-name name version)) (sha256 (base32 "0bgf0c4py22ip7qfla8mrmypfh3bg151c8awsr1gvcbw7m4ni01k")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list + #:test-flags + #~(list "--ignore-glob=tests/test_pre_commit_*.py" + "-k" (string-join + (list "not test_create_header_with_set_formats" + "test_pre_commit_hook" + "test_sync_with_pre_commit_hook") + " and not ")) #:phases #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) + (add-before 'check 'pre-check + (lambda _ ;; some tests fail when HOME=/homeless-shelter. (setenv "HOME" "/tmp") ;; OSError: [Errno 18] Invalid cross-device link - (setenv "TMPDIR" "/tmp") - (when tests? - (let ((disabled-tests - (list "test_create_header_with_set_formats" - "test_pre_commit_hook" - "test_sync_with_pre_commit_hook"))) - (invoke "pytest" "-vv" "-k" - (string-append "not " - (string-join disabled-tests - " and not ")))))))))) + (setenv "TMPDIR" "/tmp")))))) (native-inputs (list git-minimal/pinned python-gitpython