gnu: parfive: Simplify package.

* gnu/packages/python-web.scm (parfive) [build-system]: Swap to
pyproject-build-system.
[arguments] <#:phases>: Use standard 'check phase. <#:test-flags>: Move
disabled tests here and remove 'disable-test-requiring-network phase.

Change-Id: I08b67b2aa7027ac37e0a3df4da7ebb01ea3c451e
This commit is contained in:
Sharlatan Hellseher 2024-02-15 15:00:52 +00:00
parent bcf5143c1f
commit 63bcebd90e
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -1326,18 +1326,15 @@ HTTP servers, RESTful APIs, and web services.")
(sha256 (sha256
(base32 (base32
"0pf8rzfwxpkn84xzb4v8m1fy3k7kjlh8f9ln4y5xqlnbqpwi30lh")))) "0pf8rzfwxpkn84xzb4v8m1fy3k7kjlh8f9ln4y5xqlnbqpwi30lh"))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments (arguments
(list #:phases #~(modify-phases %standard-phases (list
(add-before 'check 'disable-test-requiring-network ;; Disable tests requiring network access.
(lambda _ #:test-flags
(substitute* "parfive/tests/test_downloader.py" #~(list "-k" (string-append
(("def test_ftp") "not test_ftp"
"def __off_test_ftp")))) " and not test_ftp_pasv_command"
(replace 'check " and not test_ftp_http"))))
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "python" "-m" "pytest" "-vvv" "parfive")))))))
(propagated-inputs (list python-aiofiles python-aioftp python-aiohttp (propagated-inputs (list python-aiofiles python-aioftp python-aiohttp
python-tqdm)) python-tqdm))
(native-inputs (list python-pytest (native-inputs (list python-pytest