diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2018-08-26 23:58:26 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2018-09-12 22:16:23 -0400 |
commit | 8795ce86731157577278d1510a79dec64e36d3ca (patch) | |
tree | 62f159082765acffdfdaa636c06d6921e6cef9a3 /gnu/packages/python.scm | |
parent | 7e846d07e83e5d63eee42c9361a2d1a933f79883 (diff) | |
download | patches-8795ce86731157577278d1510a79dec64e36d3ca.tar patches-8795ce86731157577278d1510a79dec64e36d3ca.tar.gz |
gnu: Add python-black.
* gnu/packages/python.scm (python-black): New variable.
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r-- | gnu/packages/python.scm | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 793961d944..525ff3f027 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -2743,6 +2743,41 @@ which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.") Language (TOML) configuration files.") (license license:expat))) +(define-public python-black + (package + (name "python-black") + (version "18.6b4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "black" version)) + (sha256 + (base32 + "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'patch-source-shebangs 'patch-extra-shebangs + (lambda _ + (let ((python3 (which "python3"))) + (substitute* '("tests/data/fmtonoff.py" + "tests/data/string_prefixes.py" + "tests/data/function.py") + (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version) + (string-append "#!" python3 (if (string? minor-version) + minor-version + "")))))))))) + (propagated-inputs + `(("python-click" ,python-click) + ("python-attrs" ,python-attrs) + ("python-appdirs" ,python-appdirs) + ("python-toml" ,python-toml))) + (home-page "https://github.com/ambv/black") + (synopsis "The uncompromising code formatter") + (description "Black is the uncompromising Python code formatter.") + (license license:expat))) + (define-public python-blinker (package (name "python-blinker") |