diff options
Diffstat (limited to 'gnu/packages/python-crypto.scm')
| -rw-r--r-- | gnu/packages/python-crypto.scm | 61 |
1 files changed, 44 insertions, 17 deletions
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 5e4f2f9aab2..412382638ad 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm | |||
| @@ -971,19 +971,42 @@ Python.") | |||
| 971 | (define-public python-pycryptodome | 971 | (define-public python-pycryptodome |
| 972 | (package | 972 | (package |
| 973 | (name "python-pycryptodome") | 973 | (name "python-pycryptodome") |
| 974 | (version "3.21.0") | 974 | (version "3.23.0") |
| 975 | (source | 975 | (source |
| 976 | (origin | 976 | (origin |
| 977 | (method url-fetch) | 977 | (method git-fetch) |
| 978 | (uri (pypi-uri "pycryptodome" version)) | 978 | (uri (git-reference |
| 979 | (url "https://github.com/Legrandin/pycryptodome") | ||
| 980 | (commit (string-append "v" version)))) | ||
| 981 | (file-name (git-file-name name version)) | ||
| 979 | (sha256 | 982 | (sha256 |
| 980 | (base32 | 983 | (base32 "0j1dk55y0q7gqmig1l5b8774w63w2i7qrii1xzkpzz0c3i229i67")) |
| 981 | "15vjyjy686kgm4fnpwlah1wvxxy0wvr4q5vnp1iygnlv8q6pwy7p")) | ||
| 982 | (modules '((guix build utils))) | 984 | (modules '((guix build utils))) |
| 983 | (snippet pycryptodome-unbundle-tomcrypt-snippet))) | 985 | (snippet pycryptodome-unbundle-tomcrypt-snippet))) |
| 984 | (build-system python-build-system) | 986 | (build-system pyproject-build-system) |
| 987 | (arguments | ||
| 988 | (list | ||
| 989 | ;; tests: 42912 passed | ||
| 990 | #:test-backend #~'custom | ||
| 991 | ;; As seen in | ||
| 992 | ;; <https://github.com/Legrandin/pycryptodome/blob/v3.23.0/INSTALL.rst>. | ||
| 993 | #:test-flags | ||
| 994 | #~(list "-m" "Crypto.SelfTest") | ||
| 995 | #:phases | ||
| 996 | #~(modify-phases %standard-phases | ||
| 997 | (add-after 'unpack 'patch-gmp-path | ||
| 998 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 999 | (substitute* "lib/Crypto/Math/_IntegerGMP.py" | ||
| 1000 | (("load_lib\\(\"gmp\"") | ||
| 1001 | (format #f "load_lib(~s" | ||
| 1002 | (search-input-file inputs "/lib/libgmp.so.10"))))))))) | ||
| 1003 | (native-inputs | ||
| 1004 | (list python-pycryptodome-test-vectors | ||
| 1005 | python-setuptools)) | ||
| 985 | (inputs | 1006 | (inputs |
| 986 | (list libtomcrypt libtommath)) | 1007 | (list gmp |
| 1008 | libtomcrypt | ||
| 1009 | libtommath)) | ||
| 987 | (home-page "https://www.pycryptodome.org") | 1010 | (home-page "https://www.pycryptodome.org") |
| 988 | (synopsis "Low-level cryptographic Python library") | 1011 | (synopsis "Low-level cryptographic Python library") |
| 989 | (description | 1012 | (description |
| @@ -1047,17 +1070,21 @@ PyCryptodome variants, the other being python-pycryptodomex.") | |||
| 1047 | license:asl2.0)))) | 1070 | license:asl2.0)))) |
| 1048 | 1071 | ||
| 1049 | (define-public python-pycryptodomex | 1072 | (define-public python-pycryptodomex |
| 1050 | (package (inherit python-pycryptodome) | 1073 | (package/inherit python-pycryptodome |
| 1051 | (name "python-pycryptodomex") | 1074 | (name "python-pycryptodomex") |
| 1052 | (version (package-version python-pycryptodome)) | 1075 | (arguments |
| 1053 | (source | 1076 | (substitute-keyword-arguments (package-arguments python-pycryptodome) |
| 1054 | (origin | 1077 | ((#:test-flags _) |
| 1055 | (method url-fetch) | 1078 | #~(list "-m" "Cryptodome.SelfTest")) |
| 1056 | (uri (pypi-uri "pycryptodomex" version)) | 1079 | ((#:phases phases #~%standard-phases) |
| 1057 | (sha256 | 1080 | #~(modify-phases #$phases |
| 1058 | (base32 "0v4y03ha7rm9kdcv9fkrmc94425z3q3mq1nn5p1jbpc1ag80nb92")) | 1081 | (add-before 'build 'set-separate-namespace |
| 1059 | (modules '((guix build utils))) | 1082 | (lambda _ |
| 1060 | (snippet pycryptodome-unbundle-tomcrypt-snippet))) | 1083 | ;; This changes the build logic, see setup.py. |
| 1084 | (with-output-to-file ".separate_namespace" | ||
| 1085 | (lambda _ (display ""))))))))) | ||
| 1086 | (synopsis | ||
| 1087 | "Low-level cryptographic Python library independent of the old PyCrypto") | ||
| 1061 | (description | 1088 | (description |
| 1062 | "PyCryptodome is a self-contained Python package of low-level | 1089 | "PyCryptodome is a self-contained Python package of low-level |
| 1063 | cryptographic primitives. It's not a wrapper to a separate C library like | 1090 | cryptographic primitives. It's not a wrapper to a separate C library like |
