guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

26/96: gnu: python-isort: Use gexps.


From: guix-commits
Subject: 26/96: gnu: python-isort: Use gexps.
Date: Wed, 19 Apr 2023 21:41:07 -0400 (EDT)

apteryx pushed a commit to branch core-updates
in repository guix.

commit 52e8f4d42634a3b9c9f143084aa9a246cf29124a
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sun Apr 16 21:59:22 2023 -0400

    gnu: python-isort: Use gexps.
    
    * gnu/packages/python-xyz.scm (python-isort) [arguments]: Use gexps.
    Delete extraneous add-installed-pythonpath call in check phase.
---
 gnu/packages/python-xyz.scm | 67 ++++++++++++++++++++++-----------------------
 1 file changed, 33 insertions(+), 34 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 316c3aaacf..0dc2f1c7cb 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20297,40 +20297,39 @@ builds partial trees by inspecting living objects.")
          "1vbwc4gpffclf6hw08lvvgqlvsgfjlw7gjsm28jfcrln2pixla7j"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'build
-           (lambda _
-             (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (whl (car (find-files "dist" "\\.whl$"))))
-               (invoke "pip" "--no-cache-dir" "--no-input"
-                       "install" "--no-deps" "--prefix" out whl))))
-         (add-after 'install 'install-example-plugins
-           (lambda _
-             (for-each (lambda (source-directory)
-                         (invoke "python" "-m" "build" "--wheel"
-                                 "--no-isolation" "--outdir=dist"
-                                 source-directory))
-                       '("example_isort_formatting_plugin"
-                         "example_isort_sorting_plugin"
-                         "example_shared_isort_profile"))
-             ;; Install them to temporary storage, for the test.
-             (setenv "HOME" (getcwd))
-             (let ((example-whls (find-files "dist" "^example.*\\.whl$")))
-               (apply invoke "pip" "--no-cache-dir" "--no-input"
-                      "install"  "--user" "--no-deps" example-whls))))
-         (replace 'check
-           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
-             (when tests?
-               (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
-                 (setenv "PATH" (string-append (getenv "PATH") ":" bin)))
-               (add-installed-pythonpath inputs outputs)
-               (invoke "pytest" "-vv" "tests/unit/"
-                       "-k" "not test_gitignore" ;requires git
-                       "--ignore=tests/unit/test_deprecated_finders.py")))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'build
+            (lambda _
+              (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
+          (replace 'install
+            (lambda _
+              (let ((whl (car (find-files "dist" "\\.whl$"))))
+                (invoke "pip" "--no-cache-dir" "--no-input"
+                        "install" "--no-deps" "--prefix" #$output whl))))
+          (add-after 'install 'install-example-plugins
+            (lambda _
+              (for-each (lambda (source-directory)
+                          (invoke "python" "-m" "build" "--wheel"
+                                  "--no-isolation" "--outdir=dist"
+                                  source-directory))
+                        '("example_isort_formatting_plugin"
+                          "example_isort_sorting_plugin"
+                          "example_shared_isort_profile"))
+              ;; Install them to temporary storage, for the test.
+              (setenv "HOME" (getcwd))
+              (let ((example-whls (find-files "dist" "^example.*\\.whl$")))
+                (apply invoke "pip" "--no-cache-dir" "--no-input"
+                       "install"  "--user" "--no-deps" example-whls))))
+          (replace 'check
+            (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+              (when tests?
+                (let ((bin (string-append #$output "/bin")))
+                  (setenv "PATH" (string-append (getenv "PATH") ":" bin)))
+                (invoke "pytest" "-vv" "tests/unit/"
+                        "-k" "not test_gitignore" ;requires git
+                        "--ignore=tests/unit/test_deprecated_finders.py")))))))
     (native-inputs
      (list python-black
            python-colorama



reply via email to

[Prev in Thread] Current Thread [Next in Thread]