Subject: [bug#74582] [PATCH python-team 2/4] build/pyproject: Fix indentation.

From: Maxim Cournoyer <[email-masked]>
Date: Thu, 28 Nov 2024 21:16:40 +0900

* guix/build/pyproject-build-system.scm: Re-indent file with Emacs.

Change-Id: I15c89628190b81a71f799e4812c3b6a360f93bcb
---
 guix/build/pyproject-build-system.scm | 36 +++++++++++++--------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/guix/build/pyproject-build-system.scm b/guix/build/pyproject-build-system.scm
index 03992d915f..d42577b259 100644
--- a/guix/build/pyproject-build-system.scm
+++ b/guix/build/pyproject-build-system.scm
@@ -77,11 +77,11 @@ (define-condition-type &python-build-error &error python-build-error?)
 
 ;; Raised when 'check cannot find a valid test system in the inputs.
 (define-condition-type &test-system-not-found &python-build-error
-                       test-system-not-found?)
+  test-system-not-found?)
 
 ;; Raised when multiple wheels are created by 'build.
 (define-condition-type &cannot-extract-multiple-wheels &python-build-error
-                       cannot-extract-multiple-wheels?)
+  cannot-extract-multiple-wheels?)
 
 ;; Raised, when no wheel has been built by the build system.
 (define-condition-type &no-wheels-built &python-build-error no-wheels-built?)
@@ -93,8 +93,7 @@ (define* (build #:key outputs build-backend configure-flags #:allow-other-keys)
     "Look up the build backend in a pyproject.toml file."
     (call-with-input-file file
       (lambda (in)
-        (let loop
-          ((line (read-line in 'concat)))
+        (let loop ((line (read-line in 'concat)))
           (if (eof-object? line) #f
               (let ((m (string-match "build-backend = [\"'](.+)[\"']" line)))
                 (if m
@@ -122,18 +121,18 @@ (define* (build #:key outputs build-backend configure-flags #:allow-other-keys)
                                 auto-build-backend
                                 "setuptools.build_meta")))
     (format #t
-     "Using '~a' to build wheels, auto-detected '~a', override '~a'.~%"
-     use-build-backend auto-build-backend build-backend)
+            "Using '~a' to build wheels, auto-detected '~a', override '~a'.~%"
+            use-build-backend auto-build-backend build-backend)
     (mkdir-p wheel-dir)
     ;; Call the PEP 517 build function, which drops a .whl into wheel-dir.
     (invoke "python" "-c"
-     "import sys, importlib, json
+            "import sys, importlib, json
 config_settings = json.loads (sys.argv[3])
 builder = importlib.import_module(sys.argv[1])
 builder.build_wheel(sys.argv[2], config_settings=config_settings)"
-     use-build-backend
-     wheel-dir
-     config-settings)))
+            use-build-backend
+            wheel-dir
+            config-settings)))
 
 (define* (check #:key tests? test-backend test-flags #:allow-other-keys)
   "Run the test suite of a given Python package."
@@ -253,19 +252,20 @@ (define* (install #:key inputs outputs #:allow-other-keys)
                         (scandir wheel-dir
                                  (cut string-suffix? ".whl" <>)))))
       (cond
-        ((> (length wheels) 1)
-         ;; This code does not support multiple wheels yet, because their
-         ;; outputs would have to be merged properly.
-         (raise (condition (&cannot-extract-multiple-wheels))))
-        ((= (length wheels) 0)
-         (raise (condition (&no-wheels-built)))))
+       ((> (length wheels) 1)
+        ;; This code does not support multiple wheels yet, because their
+        ;; outputs would have to be merged properly.
+        (raise (condition (&cannot-extract-multiple-wheels))))
+       ((= (length wheels) 0)
+        (raise (condition (&no-wheels-built)))))
       (for-each extract wheels))
     (let ((datadirs (map (cut string-append site-dir "/" <>)
                          (list-directories site-dir
                                            (file-name-predicate "\\.data$")))))
       (for-each (lambda (directory)
                   (expand-data-directory directory)
-                  (rmdir directory)) datadirs))))
+                  (rmdir directory))
+                datadirs))))
 
 (define* (compile-bytecode #:key inputs outputs #:allow-other-keys)
   "Compile installed byte-code in site-packages."
@@ -341,7 +341,7 @@ (define* (create-entrypoints #:key inputs outputs #:allow-other-keys)
 import sys
 import ~a as mod
 sys.exit (mod.~a ())~%" interpreter module function)))
-        (chmod file-path #o755)))
+      (chmod file-path #o755)))
 
   (let* ((site-dir (site-packages inputs outputs))
          (out (assoc-ref outputs "out"))
-- 
2.46.0