diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-12-08 12:23:21 +0000 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-12-08 12:32:06 +0000 |
commit | 6fb86132867e7d15ddaba707e54bded9127a525d (patch) | |
tree | 23ab8e1c298802eb8186b88e5a78f7263dc787f3 /gnu | |
parent | f2ad73507b9a313024893e837aa11774f61b273f (diff) | |
download | guix-6fb86132867e7d15ddaba707e54bded9127a525d.tar.gz guix-6fb86132867e7d15ddaba707e54bded9127a525d.zip |
gnu: python-asyncssh: Improve package style.
* gnu/packages/ssh.scm: Add pyproject-build-system.
(python-asyncssh): Use G-expressions and new package style.
[build-system]: Swap to pyrpoject-build-system.
[arguments]<test-flags>: Move skip test logic here.
<phases>: Remove 'disable-tests, add 'pre-check.
[native-inputs]: Apply list style and sort alphabetically. Add
python-setuptools, and python-wheel.
[propagated-inputs]: Apply list style and sort alphabetically.
Change-Id: I021361c3667f60b60fc137380800646f10f2cd05
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/ssh.scm | 69 |
1 files changed, 36 insertions, 33 deletions
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index a44976b598..e835200ab9 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2023 Simon Streit <simon@netpanic.org> ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se> +;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -77,6 +78,7 @@ #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix gexp) @@ -812,40 +814,41 @@ shell services and remote host selection.") (method url-fetch) (uri (pypi-uri "asyncssh" version)) (sha256 - (base32 - "11zq9ywzgyljzihdygawzad0ydly0l32zvz11liwyi8bbk087fzb")))) - (build-system python-build-system) - (propagated-inputs - (list python-cryptography python-pyopenssl python-gssapi - python-bcrypt python-typing-extensions)) - (native-inputs - (list openssh openssl python-fido2 python-aiofiles netcat - python-pytest)) + (base32 "11zq9ywzgyljzihdygawzad0ydly0l32zvz11liwyi8bbk087fzb")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'disable-tests - (lambda* _ - (substitute* "tests/test_connection.py" - ;; nc is always available. - (("which nc") "true")) - (substitute* "tests/test_agent.py" - ;; TODO Test fails for unknown reason - (("(.+)async def test_confirm" all indent) - (string-append indent "@unittest.skip('disabled by guix')\n" - indent "async def test_confirm"))) - (substitute* "tests/test_connection.py" - ;; Tests fail with: asyncssh.misc.ConnectionLost: Connection lost - (("(.+)async def test_get_server_host_key_proxy" all indent) - (string-append indent "@unittest.skip('disabled by guix')\n" - indent "async def test_get_server_host_key_proxy")) - (("(.+)async def test_connect_reverse_proxy" all indent) - (string-append indent "@unittest.skip('disabled by guix')\n" - indent "async def test_connect_reverse_proxy"))))) - (replace 'check - (lambda* (#:key tests? inputs outputs #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv"))))))) + (list + #:test-flags + #~(list "-k" (string-join + ;; TODO Test fails for unknown reason + (list "not test_confirm" + ;; Tests fail with: asyncssh.misc.ConnectionLost: + ;; Connection lost + "test_get_server_host_key_proxy" + "test_connect_reverse_proxy") + " and not " )) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda* _ + (substitute* "tests/test_connection.py" + ;; nc is always available. + (("which nc") "true"))))))) + (native-inputs + (list netcat + openssh + openssl + python-aiofiles + python-fido2 + python-pytest + python-setuptools + python-wheel)) + (propagated-inputs + (list python-cryptography + python-pyopenssl + python-gssapi + python-bcrypt + python-typing-extensions)) (home-page "https://asyncssh.readthedocs.io/") (synopsis "Asynchronous SSHv2 client and server library for Python") (description |