From 1fa1d822fa7042087f096375088629ccd4b48e9f Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 16 May 2018 15:22:28 +0200 Subject: gnu: Add python-scrypt. * gnu/packages/python-crypto.scm (python-scrypt): New variable. --- gnu/packages/python-crypto.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 50e7d25c8b5..1d1e495d9fa 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -972,3 +972,23 @@ main features are: @item Duniter signing key @end itemize") (license license:gpl3+))) + +(define-public python-scrypt + (package + (name "python-scrypt") + (version "0.8.6") + (source + (origin + (method url-fetch) + (uri (pypi-uri "scrypt" version)) + (sha256 + (base32 + "0b9nw10hfdl0jflm3b62q485ssc3f3f33lpg4yy407gs8wnrn8zq")))) + (build-system python-build-system) + (inputs + `(("openssl" ,openssl))) + (home-page "http://bitbucket.org/mhallin/py-scrypt") + (synopsis "Bindings for the scrypt key derivation function library") + (description "This is a set of Python bindings for the scrypt key +derivation function.") + (license license:bsd-2))) -- cgit v1.3 From 929d4d2f4ad8f7d1c04793ac2e436e7e0c14edd5 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 26 Jun 2018 23:58:00 +0200 Subject: 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". --- gnu/packages/python-crypto.scm | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 1d1e495d9fa..80875ad45a8 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -884,14 +884,29 @@ through the Engine interface.") "1b3rgzl6dbzs08vhv41b6y4n5189wv7lr27acxn104hs45745abs")))) (build-system python-build-system) (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 - `(("openssl" ,openssl))) + `(("libscrypt" ,libscrypt))) (home-page "https://github.com/jvarho/pylibscrypt") (synopsis "Scrypt for Python") (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 -hashlib.scrypt on Python 3.6 and OpenSSL 1.1.") +@code{libscrypt}.") (license license:isc))) (define-public python-libnacl -- cgit v1.3 From c729901583981381ef04f3be57b28e92bd81090b Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 2 Jul 2018 23:27:07 +0200 Subject: gnu: python-duniterpy: Change module. * gnu/packages/python-crypto.scm (python-duniterpy): Move... * gnu/packages/finance.scm: ... here. --- gnu/packages/finance.scm | 44 ++++++++++++++++++++++++++++++++++++++++++ gnu/packages/python-crypto.scm | 44 ------------------------------------------ 2 files changed, 44 insertions(+), 44 deletions(-) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 787510cb37b..e69b3cabc4d 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -755,6 +755,50 @@ Luhn and family of ISO/IEC 7064 check digit algorithms. ") (define-public python2-stdnum (package-with-python2 python-stdnum)) +(define-public python-duniterpy + (package + (name "python-duniterpy") + (version "0.43.2") + (source + (origin + (method git-fetch) + ;; Pypi's default URI is missing "requirements.txt" file. + (uri (git-reference + (url "https://github.com/duniter/duniter-python-api.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ch4f150k1p1l876pp08p5rxqhpv5xfbxdw6njcmr06hspv8v8x4")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; Among 108 tests, a single one is failing: FAIL: + ;; test_from_pubkey. Remove it. + (add-after 'unpack 'remove-failing-test + (lambda _ + (delete-file "tests/documents/test_crc_pubkey.py") + #t))))) + (propagated-inputs + `(("python-aiohttp" ,python-aiohttp) + ("python-base58" ,python-base58) + ("python-jsonschema" ,python-jsonschema) + ("python-libnacl" ,python-libnacl) + ("python-pylibscrypt" ,python-pylibscrypt) + ("python-pypeg2" ,python-pypeg2))) + (home-page "https://github.com/duniter/duniter-python-api") + (synopsis "Python implementation of Duniter API") + (description "@code{duniterpy} is an implementation of +@uref{https://github.com/duniter/duniter/, duniter} API. Its +main features are: +@itemize +@item Supports Duniter's Basic Merkle API and protocol +@item Asynchronous +@item Duniter signing key +@end itemize") + (license license:gpl3+))) + (define-public silkaj (package (name "silkaj") diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 80875ad45a8..2d865a92b3c 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -944,50 +944,6 @@ been constructed to maintain extensive documentation on how to use @code{NaCl} as well as being completely portable.") (license license:asl2.0))) -(define-public python-duniterpy - (package - (name "python-duniterpy") - (version "0.43.2") - (source - (origin - (method git-fetch) - ;; Pypi's default URI is missing "requirements.txt" file. - (uri (git-reference - (url "https://github.com/duniter/duniter-python-api.git") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1ch4f150k1p1l876pp08p5rxqhpv5xfbxdw6njcmr06hspv8v8x4")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - ;; Among 108 tests, a single one is failing: FAIL: - ;; test_from_pubkey. Remove it. - (add-after 'unpack 'remove-failing-test - (lambda _ - (delete-file "tests/documents/test_crc_pubkey.py") - #t))))) - (propagated-inputs - `(("python-aiohttp" ,python-aiohttp) - ("python-base58" ,python-base58) - ("python-jsonschema" ,python-jsonschema) - ("python-libnacl" ,python-libnacl) - ("python-pylibscrypt" ,python-pylibscrypt) - ("python-pypeg2" ,python-pypeg2))) - (home-page "https://github.com/duniter/duniter-python-api") - (synopsis "Python implementation of Duniter API") - (description "@code{duniterpy} is an implementation of -@uref{https://github.com/duniter/duniter/, duniter} API. Its -main features are: -@itemize -@item Supports Duniter's Basic Merkle API and protocol -@item Asynchronous -@item Duniter signing key -@end itemize") - (license license:gpl3+))) - (define-public python-scrypt (package (name "python-scrypt") -- cgit v1.3 From d3b7feb7b9cbaa5ab08942ff1331d734c5193f33 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 23 Jul 2018 16:40:21 +0300 Subject: gnu: python-asn1crypto: Don't use unstable tarball. * gnu/packages/python-crypto.scm (python-asn1crypto)[source]: Replace autogenerated tarball with git checkout. --- gnu/packages/python-crypto.scm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 2d865a92b3c..3c0fa6b21ec 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Eric Dvorsak -;;; Copyright © 2015, 2016, 2017 Efraim Flashner +;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner ;;; Copyright © 2015, 2016, 2017 Leo Famulari ;;; Copyright © 2016, 2017 Marius Bakke ;;; Copyright © 2017 Ben Sturmfels @@ -613,13 +613,14 @@ ECB and OFB).") (version "0.22.0") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/wbond/asn1crypto/archive/" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/wbond/asn1crypto.git") + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "1kn910896l3knmilla1c9ly20q181s43w1ah08lzkbm1h3j6pcz0")))) + "1n5chs5wzf1v8aii6z80dnwywjv6prk0wydamyn65kxg586wqqlf")))) (build-system python-build-system) (home-page "https://github.com/wbond/asn1crypto") (synopsis "ASN.1 parser and serializer in Python") -- cgit v1.3 From 19f2a52644ffabf4902d0506329aa29d835dda4f Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 23 Jul 2018 18:48:24 +0300 Subject: gnu: python-asn1crypto: Update to 0.24.0. * gnu/packages/python-crypto.scm (python-asn1crypto): Update to 0.24.0. --- gnu/packages/python-crypto.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-crypto.scm') diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 3c0fa6b21ec..ed8aa836fd1 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -610,7 +610,7 @@ ECB and OFB).") (define-public python-asn1crypto (package (name "python-asn1crypto") - (version "0.22.0") + (version "0.24.0") (source (origin (method git-fetch) @@ -620,7 +620,7 @@ ECB and OFB).") (file-name (git-file-name name version)) (sha256 (base32 - "1n5chs5wzf1v8aii6z80dnwywjv6prk0wydamyn65kxg586wqqlf")))) + "10lai2cs5mnz3gpaffbw1m7b885ls8328q5wxm35vfmcip1f0xmb")))) (build-system python-build-system) (home-page "https://github.com/wbond/asn1crypto") (synopsis "ASN.1 parser and serializer in Python") -- cgit v1.3