diff options
Diffstat (limited to 'gnu/packages/python-crypto.scm')
-rw-r--r-- | gnu/packages/python-crypto.scm | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index e62fc04c0f..74f61fedbf 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -542,6 +542,13 @@ message digests and key derivation functions.") (let ((crypto (package-with-python2 (strip-python2-variant python-cryptography)))) (package/inherit crypto + (arguments + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + ;; The sanity-check attempts attempts to import the non-existent + ;; modules "_openssl" and "_padding". + (delete 'sanity-check)))) (propagated-inputs `(("python2-ipaddress" ,python2-ipaddress) ("python2-backport-ssl-match-hostname" @@ -552,14 +559,14 @@ message digests and key derivation functions.") (define-public python-pyopenssl (package (name "python-pyopenssl") - (version "20.0.0") + (version "20.0.1") (source (origin (method url-fetch) (uri (pypi-uri "pyOpenSSL" version)) (sha256 (base32 - "1i8ab5zn9i9iq2ksizp3rd42v157kacddzz88kviqw3kpp68xw4j")))) + "0labcbh2g0jhgisd79wx9kixmi6fip28096d1xb05fj3jmsiq8sc")))) (build-system python-build-system) (arguments '(#:phases @@ -571,7 +578,7 @@ message digests and key derivation functions.") ;; PyOpenSSL runs tests against a certificate with a fixed ;; expiry time. To ensure successful builds in the future, ;; set the time to roughly the release date. - (invoke "faketime" "2020-12-01" "py.test" "-v" "-k" + (invoke "faketime" "2021-05-01" "py.test" "-v" "-k" (string-append ;; This test tries to look up certificates from ;; the compiled-in default path in OpenSSL, which @@ -771,31 +778,20 @@ PKCS#8, PKCS#12, PKCS#5, X.509 and TSP.") (substitute* "setup.py" (("\"wheel\"") "")) ;; Remove bundled libsodium. - (delete-file-recursively "src/libsodium") - #t)) + (delete-file-recursively "src/libsodium"))) (sha256 (base32 "01b56hxrbif3hx8l6rwz5kljrgvlbj7shmmd2rjh0hn7974a5sal")))) (build-system python-build-system) (arguments - `(#:modules (,@%python-build-system-modules - (guix build utils) - (ice-9 ftw) - (srfi srfi-26)) - #:phases - (modify-phases (@ (guix build python-build-system) %standard-phases) + `(#:phases + (modify-phases %standard-phases (add-before 'build 'use-system-sodium (lambda _ - (setenv "SODIUM_INSTALL" "system") - #t)) + (setenv "SODIUM_INSTALL" "system"))) (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"))))))) + (invoke "pytest" "-vv")))))) (native-inputs `(("python-hypothesis" ,python-hypothesis) ("python-pytest" ,python-pytest))) @@ -1169,9 +1165,7 @@ none of them have everything that I'd like, so here's one more. It uses (lambda* (#:key inputs #:allow-other-keys) (substitute* "libnacl/__init__.py" (("/usr/local/lib/libsodium.so") - (string-append (assoc-ref inputs "libsodium") - "/lib/libsodium.so"))) - #t))))) + (search-input-file inputs "/lib/libsodium.so")))))))) (native-inputs `(("python-pyhamcrest" ,python-pyhamcrest))) (inputs |