Archived
1
0
Fork 0

gnu: python-libnacl: Update to 2.1.0.

* gnu/packages/python-crypto.scm (python-libnacl): Update to 2.1.0.
[build-system]: Switch to PYPROJECT-BUILD-SYSTEM.
[arguments]: Adjust hack for locating libsodium.  Add custom check phase.
[native-inputs]: Remove PYTHON-PYHAMCREST.  Add PYTHON-POETRY-CORE.
This commit is contained in:
Marius Bakke 2023-09-22 00:39:43 +08:00
parent 9032212682
commit c2e078c602
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -1149,25 +1149,32 @@ none of them have everything that I'd like, so here's one more. It uses
(define-public python-libnacl (define-public python-libnacl
(package (package
(name "python-libnacl") (name "python-libnacl")
(version "1.7.2") (version "2.1.0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "libnacl" version)) (uri (pypi-uri "libnacl" version))
(sha256 (sha256
(base32 (base32
"0srx7i264v4dq9and8y6gpzzhrg8jpxs5iy9ggw4plimfj0rjfdm")))) "0q18j8kfibhi5qckakhf0b0psf8nkll91nfp3yqxkri9vykqshgk"))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments (arguments
`(#:phases `(#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'locate-libsodium (add-after 'unpack 'locate-libsodium
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* "libnacl/__init__.py" (substitute* "libnacl/__init__.py"
(("/usr/local/lib/libsodium.so") (("ctypes\\.util\\.find_library\\('sodium'\\)")
(search-input-file inputs "/lib/libsodium.so")))))))) (string-append "'"
(search-input-file inputs "/lib/libsodium.so")
"'")))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "python" "-m" "unittest" "discover"
"--start-directory" "tests" "-v")))))))
(native-inputs (native-inputs
(list python-pyhamcrest)) (list python-poetry-core))
(inputs (inputs
(list libsodium)) (list libsodium))
(home-page "https://libnacl.readthedocs.org/") (home-page "https://libnacl.readthedocs.org/")