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

commit f2ed197fc82e6820842f0604a8ee88cc5464ee79
Author: Nicolas Graves <[email protected]>
AuthorDate: Thu Jan 29 14:21:16 2026 +0100

    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.
---
 gnu/packages/finance.scm | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 7cf27013d2..db45446882 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")

Reply via email to