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 <sharlatanus@gmail.com>
Change-Id: I465bf1e117fc9b4cb457c24c2ed2b41cdee30968
This commit is contained in:
Nicolas Graves 2024-11-28 21:16:00 +00:00 committed by Sharlatan Hellseher
parent 922137ed75
commit 23a0d03ed1
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -543,26 +543,24 @@ design}.")
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "0bgf0c4py22ip7qfla8mrmypfh3bg151c8awsr1gvcbw7m4ni01k")))) (base32 "0bgf0c4py22ip7qfla8mrmypfh3bg151c8awsr1gvcbw7m4ni01k"))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments (arguments
(list (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 #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(replace 'check (add-before 'check 'pre-check
(lambda* (#:key tests? #:allow-other-keys) (lambda _
;; some tests fail when HOME=/homeless-shelter. ;; some tests fail when HOME=/homeless-shelter.
(setenv "HOME" "/tmp") (setenv "HOME" "/tmp")
;; OSError: [Errno 18] Invalid cross-device link ;; OSError: [Errno 18] Invalid cross-device link
(setenv "TMPDIR" "/tmp") (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 "))))))))))
(native-inputs (native-inputs
(list git-minimal/pinned (list git-minimal/pinned
python-gitpython python-gitpython