gnu: python-trio: Use pyproject-build-system.

* gnu/packages/python-xyz.scm (python-trio)[build-system]: Use
pyproject-build-system.
[arguments]: Replace custom 'check phase with #:test-flags.

Change-Id: I246933a17c1d0a669ead0292145d9b986ffca185
This commit is contained in:
Ricardo Wurmus 2024-05-06 23:08:39 +02:00 committed by Sharlatan Hellseher
parent 8928764688
commit 4a3891e4a9
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -29874,28 +29874,16 @@ project.")
(uri (pypi-uri "trio" version))
(sha256
(base32 "04qwzy4295ajxpns0hrmn3asma80sjpimzpb3i877vwynsvkjgsj"))))
(build-system python-build-system)
(build-system pyproject-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-sleep
(lambda _
(substitute* "trio/tests/test_subprocess.py"
(("/bin/sleep")
(which "sleep")))))
(add-before 'check 'change-home
(lambda _
;; Tests require a writable home.
(setenv "HOME" "/tmp")))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "pytest" "-vv"
"-n" (number->string (parallel-job-count))
"-k"
(list
#:test-flags
'(list "-k"
(string-append
;; This test times out.
"not test_ki_protection_works"
;; This fails with: signal only works in main thread of the main interpreter
" and not test_catch_signals_race_condition_on_exit"
;; Assertion errors.
" and not test_guest_mode_ki"
" and not test_run_in_trio_thread_ki"
@ -29919,7 +29907,18 @@ _cyclic_garbage"
" and not test_getprotobyname"
;; EOFError: Ran out of input.
" and not test_static_tool_sees_all_symbols")
"trio/tests")))))))
"trio/tests")
#:phases
'(modify-phases %standard-phases
(add-after 'unpack 'patch-sleep
(lambda _
(substitute* "trio/tests/test_subprocess.py"
(("/bin/sleep")
(which "sleep")))))
(add-before 'check 'change-home
(lambda _
;; Tests require a writable home.
(setenv "HOME" "/tmp"))))))
(native-inputs
(list python-astor
python-ipython
@ -29929,7 +29928,9 @@ _cyclic_garbage"
python-pytest
python-pytest-xdist
python-pytest-cov
python-trustme))
python-trustme
python-setuptools
python-wheel))
(propagated-inputs
(list python-async-generator
python-attrs