andreas pushed a commit to branch python-team
in repository guix.

commit df7d8d5f861827ccbc36a2722e8a5655972794c6
Author: Nicolas Graves <ngra...@ngraves.fr>
AuthorDate: Sun Apr 6 14:37:17 2025 +0200

    gnu: python-ledgerblue: Fix version detection.
    
    * gnu/packages/finance.scm (python-ledgerblue): Fix version detection.
    [arguments]{phases}: Add 'pretend-version phase.
    [native-inputs]: Add python-setuptools-scm.
    
    Change-Id: Ib62881b490557b838a74ce35d5557afc97c9a9bc
    Signed-off-by: Steve George <st...@futurile.net>
---
 gnu/packages/finance.scm | 52 ++++++++++++++++++++++++++----------------------
 1 file changed, 28 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 2f9ac2f59b..7157d8ab36 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1067,32 +1067,36 @@ of Bitcoin BIP-0039.")
     (name "python-ledgerblue")
     (version "0.1.54")
     (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "ledgerblue" version))
-        (sha256
-          (base32
-            "0ghpvxgih1zarp788qi1xh5xmprv6yhaxglfbix4974i7r4pszqy"))))
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ledgerblue" version))
+       (sha256
+        (base32 "0ghpvxgih1zarp788qi1xh5xmprv6yhaxglfbix4974i7r4pszqy"))))
     (build-system pyproject-build-system)
     (arguments
-     `(#:tests? #f)) ; no tests
-    (native-inputs
-     (list python-setuptools python-wheel))
-    (propagated-inputs
-     (list python-bleak
-           python-pyelftools
-           python-pycryptodome
-           python-ecpy
-           python-future
-           python-gnupg
-           python-hidapi
-           python-nfcpy
-           python-pillow
-           python-protobuf
-           python-pycryptodomex
-           python-pyscard
-           python-u2flib-host
-           python-websocket-client))
+     (list
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'pretend-version
+            (lambda _
+              (setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
+                      #$version))))))
+    (native-inputs (list python-setuptools python-setuptools-scm python-wheel))
+    (propagated-inputs (list python-bleak
+                             python-pyelftools
+                             python-pycryptodome
+                             python-ecpy
+                             python-future
+                             python-gnupg
+                             python-hidapi
+                             python-nfcpy
+                             python-pillow
+                             python-protobuf
+                             python-pycryptodomex
+                             python-pyscard
+                             python-u2flib-host
+                             python-websocket-client))
     (home-page "https://github.com/LedgerHQ/blue-loader-python";)
     (synopsis "Python library to communicate with Ledger Blue/Nano S")
     (description "@code{ledgerblue} is a Python library to communicate with

Reply via email to