summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Schott <sschott@mailbox.org>2020-03-07 16:11:44 +0100
committerChristopher Baines <mail@cbaines.net>2020-03-15 16:41:44 +0000
commitdcf953299505274e542ea8c79141b21f1f18277d (patch)
tree8469aef13c1a3ba66f1618fc4ca90d86114d0751
parent23fde56b330c0d27f6cff161ab16d857d8975303 (diff)
downloadpatches-dcf953299505274e542ea8c79141b21f1f18277d.tar
patches-dcf953299505274e542ea8c79141b21f1f18277d.tar.gz
gnu: Add python-colorlog
* gnu/packages/python-xyz.scm (python-colorlog): New variable. Signed-off-by: Christopher Baines <mail@cbaines.net>
-rw-r--r--gnu/packages/python-xyz.scm29
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 26e1927cb9..2dd3d04706 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -171,6 +171,35 @@
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26))
+(define-public python-colorlog
+ (package
+ (name "python-colorlog")
+ (version "4.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "colorlog" version))
+ (sha256
+ (base32
+ "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ ;; Extend PYTHONPATH so the built package will be found.
+ (setenv "PYTHONPATH"
+ (string-append (getcwd) "/build/lib:"
+ (getenv "PYTHONPATH")))
+ (invoke "pytest" "-p" "no:logging")
+ #t)))))
+ (home-page "https://github.com/borntyping/python-colorlog")
+ (synopsis "Log formatting with colors for python")
+ (description "The @code{colorlog.ColoredFormatter} is a formatter for use
+with Python's logging module that outputs records using terminal colors.")
+ (license license:expat)))
+
(define-public python-pyprind
(package
(name "python-pyprind")