me
/
guix
Archived
1
0
Fork 0

gnu: python-pynacl: Update to 1.4.0.

* gnu/packages/python-crypto.scm (python-pynacl): Update to 1.4.0.
[source](snippet): Adjust to fix spurious build requirement.
[arguments]: Add #:modules.  Replace check phase with custom pytest invocation.
master
Marius Bakke 2020-07-14 21:24:39 +02:00
parent 2008b8b7af
commit f5e3f02fdd
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 26 additions and 8 deletions

View File

@ -739,26 +739,44 @@ PKCS#8, PKCS#12, PKCS#5, X.509 and TSP.")
(define-public python-pynacl (define-public python-pynacl
(package (package
(name "python-pynacl") (name "python-pynacl")
(version "1.3.0") (version "1.4.0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "PyNaCl" version)) (uri (pypi-uri "PyNaCl" version))
(modules '((guix build utils))) (modules '((guix build utils)))
;; Remove bundled libsodium. (snippet
(snippet '(begin (delete-file-recursively "src/libsodium") '(begin
#t)) ;; Remove spurious dependency on python-wheel, can be removed
;; for 1.5.
(substitute* "setup.py"
(("\"wheel\"") ""))
;; Remove bundled libsodium.
(delete-file-recursively "src/libsodium")
#t))
(sha256 (sha256
(base32 (base32
"0330wyvggm19xhmwmz9rrr97lzbv3siwfy50gmax3vvgs7nh0q8c")))) "01b56hxrbif3hx8l6rwz5kljrgvlbj7shmmd2rjh0hn7974a5sal"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:phases `(#:modules (,@%python-build-system-modules
(modify-phases %standard-phases (guix build utils)
(ice-9 ftw)
(srfi srfi-26))
#:phases
(modify-phases (@ (guix build python-build-system) %standard-phases)
(add-before 'build 'use-system-sodium (add-before 'build 'use-system-sodium
(lambda _ (lambda _
(setenv "SODIUM_INSTALL" "system") (setenv "SODIUM_INSTALL" "system")
#t))))) #t))
(replace 'check
(lambda _
(let ((build-directory
(car (scandir "build" (cut string-prefix? "lib" <>)))))
(setenv "PYTHONPATH"
(string-append "./build/" build-directory ":"
(getenv "PYTHONPATH")))
(invoke "pytest" "-vv")))))))
(native-inputs (native-inputs
`(("python-hypothesis" ,python-hypothesis) `(("python-hypothesis" ,python-hypothesis)
("python-pytest" ,python-pytest))) ("python-pytest" ,python-pytest)))