summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2026-01-29 14:21:16 +0100
committerAndreas Enge <andreas@enge.fr>2026-02-07 12:28:54 +0100
commit78708529c279fe4f1e6a387aa37e2a1e4fc5901a (patch)
tree1e0c0b28ced4581896772d5b42c95703c8ea8e19
parentaa58739aad036294c8c1a63b82de4fd152f0a769 (diff)
gnu: ledger: Switch to pyproject.
* gnu/packages/finance.scm (ledger): [arguments]<#:imported-modules, #:modules>: Switch to pyproject-build-system. <#:phases>: Use site-packages in phase 'fix-python-installation-directory.
-rw-r--r--gnu/packages/finance.scm19
1 files changed, 9 insertions, 10 deletions
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index c9d0a7c6d43..d3a55f61c8b 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -395,10 +395,11 @@ and dynamically with report tools based on filtering and graphical charts.")
(build-system cmake-build-system)
(arguments
(list
- #:modules `(,@%cmake-build-system-modules
- ((guix build python-build-system) #:select (python-version)))
- #:imported-modules `(,@%cmake-build-system-modules
- (guix build python-build-system))
+ #:imported-modules (append %cmake-build-system-modules
+ %pyproject-build-system-modules)
+ #:modules '((guix build cmake-build-system)
+ (guix build utils)
+ ((guix build pyproject-build-system) #:prefix py:))
#:configure-flags
#~(list "-DBUILD_DOCS:BOOL=ON"
"-DBUILD_WEB_DOCS:BOOL=ON"
@@ -411,12 +412,10 @@ and dynamically with report tools based on filtering and graphical charts.")
;; By default the package attempts to install its Python bindings
;; to the Python store directory, which obviously does not work.
;; Passing -DPython_SITEARCH in #:configure-flags has no effect.
- (let ((python-version (python-version (assoc-ref inputs "python")))
- (out (assoc-ref outputs "out")))
- (substitute* "src/CMakeLists.txt"
- (("DESTINATION \\$\\{Python_SITEARCH\\}")
- (string-append "DESTINATION " out "/lib/python"
- python-version "/site-packages"))))))
+ (substitute* "src/CMakeLists.txt"
+ (("DESTINATION \\$\\{Python_SITEARCH\\}")
+ (string-append "DESTINATION "
+ (py:site-packages inputs outputs))))))
(add-before 'configure 'install-examples
(lambda* (#:key outputs #:allow-other-keys)
(let ((examples (string-append (assoc-ref outputs "out")