summary refs log tree commit diff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2022-08-12 10:35:32 +0200
committerMathieu Othacehe <othacehe@gnu.org>2022-08-12 10:37:03 +0200
commit1385ef76d7a9ed07f0f0d0cc94ef457130662cc8 (patch)
tree892f5d105844813ad360efb19e645a52b4f6c9ee /gnu/packages/python-xyz.scm
parent3ceb985e756ac9fcf0633fb556c8905df7602e7d (diff)
downloadguix-1385ef76d7a9ed07f0f0d0cc94ef457130662cc8.tar.gz
gnu: python-typer: Introduce gexps.
* gnu/packages/python-xyz.scm (python-typer)[arguments]: Switch to gexps.
[synopsis, description]: Fix indentation.
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm82
1 files changed, 42 insertions, 40 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d7f8902bff..d39c6c2ceb 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21526,44 +21526,46 @@ based on the CPython 2.7 and 3.7 parsers.")
     (build-system python-build-system)
     (arguments
      `(#:phases
-       (modify-phases %standard-phases
-         ;; Unfortunately, this doesn't seem to be enough to fix these two
-         ;; tests, but we'll patch this anyway.
-         (add-after 'unpack 'patch-shell-reference
-           (lambda _
-             (substitute* "tests/test_completion/test_completion.py"
-               (("\"bash\"") (string-append "\"" (which "bash") "\""))
-               (("\"/bin/bash\"") (string-append "\"" (which "bash") "\"")))))
-         (replace 'build
-           (lambda _
-             (invoke "flit" "build")))
-         (replace 'install
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (add-installed-pythonpath inputs outputs)
-             (let ((out (assoc-ref outputs "out")))
-               (for-each (lambda (wheel)
-                           (format #true wheel)
-                           (invoke "python" "-m" "pip" "install"
-                                   wheel (string-append "--prefix=" out)))
-                         (find-files "dist" "\\.whl$")))))
-         (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
-             (when tests?
-               (setenv "HOME" "/tmp") ; some tests need it
-
-               ;; This is for completion tests
-               (with-output-to-file "/tmp/.bashrc" (lambda _ (display "# dummy")))
-
-               (setenv "GUIX_PYTHONPATH"
-                       (string-append (getcwd) ":"
-                                      (getenv "GUIX_PYTHONPATH")))
-               (let ((disabled-tests (list "test_show_completion"
-                                           "test_install_completion")))
-                 (invoke "python" "-m" "pytest" "tests/"
-                         "-k"
-                         (string-append "not "
-                                        (string-join disabled-tests
-                                                     " and not "))))))))))
+       ,#~(modify-phases %standard-phases
+            ;; Unfortunately, this doesn't seem to be enough to fix these two
+            ;; tests, but we'll patch this anyway.
+            (add-after 'unpack 'patch-shell-reference
+              (lambda _
+                (substitute* "tests/test_completion/test_completion.py"
+                  (("\"bash\"") (string-append "\"" (which "bash") "\""))
+                  (("\"/bin/bash\"")
+                   (string-append "\"" (which "bash") "\"")))))
+            (replace 'build
+              (lambda _
+                (invoke "flit" "build")))
+            (replace 'install
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                (add-installed-pythonpath inputs outputs)
+                (for-each
+                 (lambda (wheel)
+                   (format #true wheel)
+                   (invoke "python" "-m" "pip" "install"
+                           wheel (string-append "--prefix=" #$output)))
+                 (find-files "dist" "\\.whl$"))))
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (setenv "HOME" "/tmp") ; some tests need it
+
+                  ;; This is for completion tests
+                  (with-output-to-file "/tmp/.bashrc"
+                    (lambda _ (display "# dummy")))
+
+                  (setenv "GUIX_PYTHONPATH"
+                          (string-append (getcwd) ":"
+                                         (getenv "GUIX_PYTHONPATH")))
+                  (let ((disabled-tests (list "test_show_completion"
+                                              "test_install_completion")))
+                    (invoke "python" "-m" "pytest" "tests/"
+                            "-k"
+                            (string-append "not "
+                                           (string-join disabled-tests
+                                                        " and not "))))))))))
     (propagated-inputs
      (list python-click))
     (native-inputs
@@ -21571,9 +21573,9 @@ based on the CPython 2.7 and 3.7 parsers.")
            python-shellingham))
     (home-page "https://github.com/tiangolo/typer")
     (synopsis
-      "Typer builds CLI based on Python type hints")
+     "Typer builds CLI based on Python type hints")
     (description
-      "Typer is a library for building CLI applications.  It's based on
+     "Typer is a library for building CLI applications.  It's based on
 Python 3.6+ type hints.")
     ;; MIT license
     (license license:expat)))