[bug#77575,15/21] gnu: python-ledgerblue: Fix version detection.

Message ID 20250406123732.31301-15-ngraves@ngraves.fr
State New
Headers
Series More patches |

Commit Message

Nicolas Graves April 6, 2025, 12:37 p.m. UTC
  * gnu/packages/finance.scm (python-ledgerblue): Fix version detection.
[arguments]{phases}: Add 'pretend-version phase.
[native-inputs]: Add python-setuptools-scm.
---
 gnu/packages/finance.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 680ebe467c..f7e7ca1fff 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1065,9 +1065,14 @@  (define-public python-ledgerblue
             "0ghpvxgih1zarp788qi1xh5xmprv6yhaxglfbix4974i7r4pszqy"))))
     (build-system pyproject-build-system)
     (arguments
-     `(#:tests? #f)) ; no tests
+     (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-wheel))
+     (list python-setuptools python-setuptools-scm python-wheel))
     (propagated-inputs
      (list python-bleak
            python-pyelftools