@@ -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.")