guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 7a87511bd6e4476acf95a52ed80d998c475fbf1d
Author: Nicolas Graves <[email protected]>
AuthorDate: Sun Oct 19 17:26:15 2025 +0200

    gnu: python-file: Switch to pyproject.
    
    * gnu/packages/python-xyz.scm (python-file):
    [build-system]: Switch to pyproject-build-system.
    [arguments, inputs]: Improve style.
    [native-inputs]: Add python-setuptools.
    
    Change-Id: I88fb7017ec8dab99b0da126e94dc660d344fd577
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/python-xyz.scm | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1551ea9c28..4ceefbff04 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18679,26 +18679,26 @@ Python's @code{ctypes} foreign function interface 
(FFI).")
 (define-public python-file
   (package/inherit file
     (name "python-file")
-    (build-system python-build-system)
+    (build-system pyproject-build-system)
     (arguments
-     '(#:tests? #f                                ;no tests
-       #:configure-flags '("--single-version-externally-managed" "--root=/")
-       #:phases (modify-phases %standard-phases
-                  (add-before 'build 'change-directory
-                    (lambda _
-                      (chdir "python")
-                      #t))
-                  (add-before 'build 'set-library-file-name
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      (let ((file (assoc-ref inputs "file")))
-                        (substitute* "magic.py"
-                          (("find_library\\('magic'\\)")
-                           (string-append "'" file "/lib/libmagic.so'")))
-                        #t))))))
-    (inputs `(("file" ,file)))
-    (native-inputs (if (%current-target-system)
-                       `(("self" ,this-package))
-                       '()))
+     (list
+      #:tests? #f                                ;no tests
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'change-directory
+            (lambda _
+              (chdir "python")))
+          (add-before 'build 'set-library-file-name
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "magic.py"
+                (("find_library\\('magic'\\)")
+                 (format #f "~s" (search-input-file inputs
+                                                    "lib/libmagic.so")))))))))
+    (inputs (list file))
+    (native-inputs (cons* python-setuptools
+                          (if (%current-target-system)
+                              (list this-package)
+                              '())))
     (synopsis "Python bindings to the libmagic file type guesser")
     (description "This package provides Python bindings to the libmagic file
 type guesser.

Reply via email to