all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 74582@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>,
	Maxim Cournoyer <maxim.cournoyer@gmail.com>,
	Lars-Dominik Braun <lars@6xq.net>, Marius Bakke <marius@gnu.org>,
	Munyoki Kilyungi <me@bonfacemunyoki.com>,
	Sharlatan Hellseher <sharlatanus@gmail.com>,
	Tanguy Le Carrour <tanguy@bioneland.org>,
	jgart <jgart@dismail.de>
Subject: [bug#74582] [PATCH python-team 2/4] build/pyproject: Fix indentation.
Date: Thu, 28 Nov 2024 21:16:40 +0900	[thread overview]
Message-ID: <90f63776c70ab18318067ceaab407f72b5093876.1732781055.git.maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <cover.1732781055.git.maxim.cournoyer@gmail.com>

* 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





  parent reply	other threads:[~2024-11-28 12:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-28  8:05 [bug#74582] [PATCH python-team 0/4] Fix edge case in pyproject-build-system Maxim Cournoyer
2024-11-28 12:16 ` [bug#74582] [PATCH python-team 1/4] build/pyproject: Really merge directories in install phase Maxim Cournoyer
2024-11-29  7:23   ` Lars-Dominik Braun
2024-11-28 12:16 ` Maxim Cournoyer [this message]
2024-11-28 12:16 ` [bug#74582] [PATCH python-team 3/4] build/pyproject: Update PEP 427 reference URL in comment Maxim Cournoyer
2024-11-28 12:16 ` [bug#74582] [PATCH python-team 4/4] build/pyproject: Resolve import warning Maxim Cournoyer
2024-11-28 18:44   ` jgart via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=90f63776c70ab18318067ceaab407f72b5093876.1732781055.git.maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=74582@debbugs.gnu.org \
    --cc=jgart@dismail.de \
    --cc=lars@6xq.net \
    --cc=marius@gnu.org \
    --cc=me@bonfacemunyoki.com \
    --cc=sharlatanus@gmail.com \
    --cc=tanguy@bioneland.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.