mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: python-pylibscrypt: Improve speed.
* gnu/packages/python-crypto.scm (python-pylibscrypt): Use "libscrypt" implementation instead of "openssl". "hashlib.scrypt" requires Python 3.6+ and OpenSSL 1.1+. Since Python is built with OpenSSL 1.0, the library is unavailable. "pylibscrypt" defaults to a slow pure Python implementation. Instead, rely on the much faster "libscrypt".
This commit is contained in:
parent
84be0e9a74
commit
929d4d2f4a
1 changed files with 18 additions and 3 deletions
|
@ -884,14 +884,29 @@ (define-public python-pylibscrypt
|
||||||
"1b3rgzl6dbzs08vhv41b6y4n5189wv7lr27acxn104hs45745abs"))))
|
"1b3rgzl6dbzs08vhv41b6y4n5189wv7lr27acxn104hs45745abs"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f)) ;FIXME: unable to find libraries
|
`(#:phases
|
||||||
|
(modify-phases %standard-phases
|
||||||
|
(add-before 'build 'hard-code-path-to-libscrypt
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((libscrypt (assoc-ref inputs "libscrypt")))
|
||||||
|
(substitute* "pylibscrypt/pylibscrypt.py"
|
||||||
|
(("find_library\\('scrypt'\\)")
|
||||||
|
(string-append "'" libscrypt "/lib/libscrypt.so'")))
|
||||||
|
#t))))
|
||||||
|
;; The library can use various scrypt implementations and tests all of
|
||||||
|
;; them. Since we only provide a single implementation, most tests
|
||||||
|
;; fail. Simply skip them.
|
||||||
|
#:tests? #f))
|
||||||
|
;; FIXME: Using "libscrypt" is the second best choice. The best one
|
||||||
|
;; requires "hashlib.scrypt", provided by Python 3.6+ built with OpenSSL
|
||||||
|
;; 1.1+. Use that as soon as Guix provides it.
|
||||||
(inputs
|
(inputs
|
||||||
`(("openssl" ,openssl)))
|
`(("libscrypt" ,libscrypt)))
|
||||||
(home-page "https://github.com/jvarho/pylibscrypt")
|
(home-page "https://github.com/jvarho/pylibscrypt")
|
||||||
(synopsis "Scrypt for Python")
|
(synopsis "Scrypt for Python")
|
||||||
(description "There are a lot of different scrypt modules for Python, but
|
(description "There are a lot of different scrypt modules for Python, but
|
||||||
none of them have everything that I'd like, so here's one more. It uses
|
none of them have everything that I'd like, so here's one more. It uses
|
||||||
hashlib.scrypt on Python 3.6 and OpenSSL 1.1.")
|
@code{libscrypt}.")
|
||||||
(license license:isc)))
|
(license license:isc)))
|
||||||
|
|
||||||
(define-public python-libnacl
|
(define-public python-libnacl
|
||||||
|
|
Loading…
Reference in a new issue