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

commit 50e450a14f8023bb783811a619d966a0dea876ef
Author: Nicolas Graves <[email protected]>
AuthorDate: Thu Jan 29 14:27:10 2026 +0100

    gnu: gdal: Switch to pyproject.
    
    * gnu/packages/geo.scm (gdal):
    [arguments]<#:imported-modules, #:modules>: Switch to
    pyproject-build-system.
    <#:phases>: Improve phase 'swap-files, use site-packages.
    
    Change-Id: Ie24b7c787a16d18c3b93f6bb10dd09095205562f
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/geo.scm | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index d53775916c..2d76a207f5 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -1727,11 +1727,11 @@ vector data.")
     (arguments
      (list
       #:tests? #f
+      #:imported-modules (append %cmake-build-system-modules
+                                 %pyproject-build-system-modules)
       #:modules '((guix build cmake-build-system)
-                  ((guix build python-build-system) #:prefix python:)
+                  ((guix build pyproject-build-system) #:prefix py:)
                   (guix build utils))
-      #:imported-modules `(,@%cmake-build-system-modules
-                           (guix build python-build-system))
       #:configure-flags
       #~(list "-DGDAL_USE_INTERNAL_LIBS=WHEN_NO_EXTERNAL"
               "-DGDAL_USE_JPEG12_INTERNAL=OFF"
@@ -1740,20 +1740,19 @@ vector data.")
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'install 'swap-files
-            (lambda _
+            (lambda* (#:key inputs outputs #:allow-other-keys)
               ;; The RPATH of the binaries in build/swig/python/build/ is
               ;; rewritten in build/swig/python/for_install/build/.  For
               ;; unknown reasons the files in the former directory are
               ;; installed when it should be those in the latter directory.
               ;; So we copy them ourselves.
-              (with-directory-excursion 
"../build/swig/python/for_install/build"
+              (with-directory-excursion
+                  "../build/swig/python/for_install/build"
                 (for-each (lambda (file)
                             (install-file file
                                           (string-append
-                                           #$output
-                                           "/lib/python"
-                                           (python:python-version 
#$(this-package-native-input "python"))
-                                           "/site-packages/osgeo")))
+                                           (py:site-packages inputs outputs)
+                                           "/osgeo")))
                           (find-files "." "\\.so"))))))))
     (inputs
      (list curl

Reply via email to