Subject: [PATCH 2/4] gnu: python-mnemonic: Update to 0.21.

From: [email-masked]
Date: Mon, 9 Sep 2024 16:28:21 +0200

From: Attila Lendvai <[email-masked]>

* gnu/packages/finance.scm (python-mnemonic): Build from git and use
pyproject-build-system to build it.

Change-Id: Ie033cd8afa11711da070d3fc792375c3648c1756
---
 gnu/packages/finance.scm | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 317842c5937..8547676b51b 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1019,16 +1019,25 @@ (define-public trezor-gpg-pinentry-tk
 (define-public python-mnemonic
   (package
     (name "python-mnemonic")
-    (version "0.20")
+    (version "0.21")
     (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "mnemonic" version))
-        (sha256
-          (base32 "1xi5qvj2rvi5almf9c89rl7hz1z4ms04d53pg818i4vpkmivavvw"))))
-    (build-system python-build-system)
-    (propagated-inputs
-     (list python-pbkdf2))
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/trezor/python-mnemonic")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1r8cdlgqpmj71ap3kyhc2nq8dn29gmj7v8dlq8kgcy91jky94n8g"))))
+    (build-system pyproject-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (invoke "python" "tests/test_mnemonic.py"))))))
+    (native-inputs
+     (list python-poetry-core))
     (home-page "https://github.com/trezor/python-mnemonic")
     (synopsis "Implementation of Bitcoin BIP-0039")
     (description "@code{mnemonic} is a library that provides an implementation
-- 
2.46.0