guix-commits
[Top][All Lists]
Advanced

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

80/150: gnu: python-isort: Remove custom build phases.


From: guix-commits
Subject: 80/150: gnu: python-isort: Remove custom build phases.
Date: Sun, 24 Apr 2022 05:12:25 -0400 (EDT)

lbraun pushed a commit to branch wip-python-pep517
in repository guix.

commit 3886bfbb49487ce5f6a1d55ba7af295288c9effd
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Fri Dec 31 15:09:49 2021 +0100

    gnu: python-isort: Remove custom build phases.
    
    * gnu/packages/python-xyz.scm (python-isort)[arguments]: Remove custom
    build phases and disable some tests, which depend on example plugins.
    [native-inputs]: Remove python-pypa-build.
---
 gnu/packages/python-xyz.scm | 62 +++++++--------------------------------------
 1 file changed, 9 insertions(+), 53 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index beee043922..368cb6b7ab 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19055,58 +19055,15 @@ multitouch applications.")
          "09spgl2k9xrprr5gbpfc91a8p7mx7a0c64ydgc91b3jhrmnd9jg1"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'loosen-requirements
-           (lambda _
-             ;; Permit newer versions of black.
-             (substitute* "example_isort_formatting_plugin/pyproject.toml"
-               (("\\^20\\.08b1")
-                ">= 20.08b1"))))
-         ;; A foretaste of what our future python-build-system will need to
-         ;; do.
-         (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* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               ;; Patch to use the core poetry API.
-               (substitute* '("example_isort_formatting_plugin/pyproject.toml"
-                              "example_isort_sorting_plugin/pyproject.toml"
-                              "example_shared_isort_profile/pyproject.toml")
-                 (("poetry>=0.12")
-                  "poetry-core>=1.0.0")
-                 (("poetry.masonry.api")
-                  "poetry.core.masonry.api"))
-               ;; Build the example plugins.
-               (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")))))))
+     `(#:test-flags `("-vv" "tests/unit/"
+                      "--ignore=tests/unit/test_deprecated_finders.py"
+                      "-k"
+                      ;; These tests depend on example plugins, which are not 
installed.
+                      ,(string-append
+                        "not test_value_assignment_list "
+                        "and not test_isort_supports_shared_profiles_issue_970 
"
+                        "and not 
test_isort_supports_formatting_plugins_issue_1353 "
+                        "and not test_isort_literals_issue_1358"))))
     (native-inputs
      (list python-black
            python-colorama
@@ -19115,7 +19072,6 @@ multitouch applications.")
            python-natsort
            python-poetry-core
            python-pylama
-           python-pypa-build
            python-pytest-mock
            python-pytest))
     (home-page "https://github.com/PyCQA/isort";)



reply via email to

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