guix-patches
[Top][All Lists]
Advanced

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

[bug#66788] [PATCH 1/2] gnu: python-black: Update to 23.1.0.


From: Nicolas Graves
Subject: [bug#66788] [PATCH 1/2] gnu: python-black: Update to 23.1.0.
Date: Sun, 4 Feb 2024 13:54:38 +0100

* gnu/packages/python-xyz.scm (python-black): Update to 23.1.0.
---
 gnu/packages/python-xyz.scm | 36 +++++++++++++++++-------------------
 1 file changed, 17 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c68b17b0ab..5ffea67fc9 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7496,43 +7496,41 @@ (define-public python-language-server
 (define-public python-black
   (package
     (name "python-black")
-    (version "22.3.0")
+    (version "23.1.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "black" version))
        (sha256
-        (base32
-         "0yfahlqc7dsdp1js0cbv706apldnfnlbal9b53cww8n0hs40n0im"))))
-    (build-system python-build-system)
+        (base32 "1b4jjv3fw2wgssnw2v1x0w09s7rz9sj5g4i1lwmmlgwhm2z9ggdh"))))
+    (build-system pyproject-build-system)
+    ;; These tests fail because Guix replaces the file shebangs.
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'patch-source-shebangs 'use-absolute-file-names
-           (lambda* (#:key native-inputs inputs #:allow-other-keys)
-             (let* ((inpts (or native-inputs inputs))
-                    (python3 (search-input-file inpts "/bin/python3")))
-               (substitute* (find-files "tests" "\\.py$")
-                 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
-                  (string-append "#!" python3 (if (string? minor-version)
-                                                  minor-version
-                                                  "")))))))
-         (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
-             (when tests? (invoke "pytest" "-vv")))))))
+     '(#:test-flags `("-k" ,(string-append
+                             "not test_infer_target_version "
+                             "and not test_simple_format[fmtonoff] "
+                             "and not test_simple_format[function] "
+                             "and not test_simple_format[string_prefixes] "
+                             "and not test_python_39[python39]"))))
     (propagated-inputs
      (list python-click
            python-attrs
            python-appdirs
            python-pathspec
            python-mypy-extensions
+           python-packaging
            python-platformdirs
            python-regex
            python-tomli
            python-typed-ast
            python-typing-extensions))
     (native-inputs
-     (list python-pytest python-pytest-aiohttp python-setuptools-scm))
+     (list python-hatchling
+           python-hatch-vcs
+           python-hatch-fancy-pypi-readme
+           python-pytest
+           python-pytest-aiohttp
+           python-setuptools-scm))
     (home-page "https://github.com/psf/black";)
     (synopsis "The uncompromising code formatter")
     (description "Black is the uncompromising Python code formatter.")
-- 
2.41.0






reply via email to

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