mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-black: Update to 19.10b0.
* gnu/packages/python-xyz.scm (python-black): Update to 19.10b0. [arguments]: Patch tests. [propagated-inputs]: Add python-pathspec, python-regex, and python-typed-ast. [native-inputs]: Add python-setuptools-scm.
This commit is contained in:
parent
c777ecb372
commit
5f603fab23
1 changed files with 28 additions and 5 deletions
|
@ -3177,14 +3177,14 @@ matching of file paths.")
|
||||||
(define-public python-black
|
(define-public python-black
|
||||||
(package
|
(package
|
||||||
(name "python-black")
|
(name "python-black")
|
||||||
(version "18.6b4")
|
(version "19.10b0")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (pypi-uri "black" version))
|
(uri (pypi-uri "black" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
|
"0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:phases
|
||||||
|
@ -3194,16 +3194,39 @@ matching of file paths.")
|
||||||
(let ((python3 (which "python3")))
|
(let ((python3 (which "python3")))
|
||||||
(substitute* '("tests/data/fmtonoff.py"
|
(substitute* '("tests/data/fmtonoff.py"
|
||||||
"tests/data/string_prefixes.py"
|
"tests/data/string_prefixes.py"
|
||||||
"tests/data/function.py")
|
"tests/data/function.py"
|
||||||
|
"tests/data/python37.py")
|
||||||
(("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
|
(("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
|
||||||
(string-append "#!" python3 (if (string? minor-version)
|
(string-append "#!" python3 (if (string? minor-version)
|
||||||
minor-version
|
minor-version
|
||||||
""))))))))))
|
"")))))
|
||||||
|
#t))
|
||||||
|
(add-after 'unpack 'disable-broken-tests
|
||||||
|
(lambda _
|
||||||
|
;; These tests are supposed to be skipped when the blackd
|
||||||
|
;; dependencies are missing, but this doesn't quite work.
|
||||||
|
(substitute* "tests/test_black.py"
|
||||||
|
(("( *)class BlackDTestCase.*" match indent)
|
||||||
|
(string-append indent "@unittest.skip(\"no blackd deps\")\n"
|
||||||
|
indent "class BlackDTestCase(unittest.TestCase):\n"))
|
||||||
|
(("web.Application") "False")
|
||||||
|
(("@unittest_run_loop") ""))
|
||||||
|
|
||||||
|
;; Patching the above file breaks the self test
|
||||||
|
(substitute* "tests/test_black.py"
|
||||||
|
(("( *)def test_self" match indent)
|
||||||
|
(string-append indent "@unittest.skip(\"guix\")\n" match)))
|
||||||
|
#t)))))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
`(("python-click" ,python-click)
|
`(("python-click" ,python-click)
|
||||||
("python-attrs" ,python-attrs)
|
("python-attrs" ,python-attrs)
|
||||||
("python-appdirs" ,python-appdirs)
|
("python-appdirs" ,python-appdirs)
|
||||||
("python-toml" ,python-toml)))
|
("python-pathspec" ,python-pathspec)
|
||||||
|
("python-regex" ,python-regex)
|
||||||
|
("python-toml" ,python-toml)
|
||||||
|
("python-typed-ast" ,python-typed-ast)))
|
||||||
|
(native-inputs
|
||||||
|
`(("python-setuptools-scm" ,python-setuptools-scm)))
|
||||||
(home-page "https://github.com/ambv/black")
|
(home-page "https://github.com/ambv/black")
|
||||||
(synopsis "The uncompromising code formatter")
|
(synopsis "The uncompromising code formatter")
|
||||||
(description "Black is the uncompromising Python code formatter.")
|
(description "Black is the uncompromising Python code formatter.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue