guix-commits
[Top][All Lists]
Advanced

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

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


From: guix-commits
Subject: 80/103: gnu: python-isort: Remove custom build phases.
Date: Wed, 5 Jan 2022 09:44:39 -0500 (EST)

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

commit db80fe6a8240ee29cc78d47c54f0baf76caa6a5d
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 | 53 ++++++++-------------------------------------
 1 file changed, 9 insertions(+), 44 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0ded1f5477..324de05291 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18090,49 +18090,15 @@ multitouch applications.")
          "0phq4s911mjjdyr5h5siz93jnpkqb2qgphgcfk6axncgxr8i7vi1"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         ;; 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_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_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/"
-                       "--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
      `(("git" ,git-minimal)
        ("python-black" ,python-black)
@@ -18141,7 +18107,6 @@ multitouch applications.")
        ("python-libcst" ,python-libcst-minimal)
        ("python-poetry-core" ,python-poetry-core)
        ("python-pylama" ,python-pylama)
-       ("python-pypa-build" ,python-pypa-build)
        ("python-pytest-mock" ,python-pytest-mock)
        ("python-pytest" ,python-pytest)))
     (home-page "https://github.com/PyCQA/isort";)



reply via email to

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