From 4f4d4a9bd49834834cbfca0a89e1acd4456f3173 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 4 Nov 2021 11:41:45 +0530 Subject: gnu: Add python-webcolors. * gn/packages/python.scm (python-webcolors): New variable. --- gn/packages/python.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'gn') diff --git a/gn/packages/python.scm b/gn/packages/python.scm index d14518d..f09e1bb 100644 --- a/gn/packages/python.scm +++ b/gn/packages/python.scm @@ -1861,3 +1861,42 @@ window to get to RStudio for example.") "This extension adds a toolbar overlay to Flask applications containing useful information for debugging.") (license license:bsd-3))) + +(define-public python-webcolors + (package + (name "python-webcolors") + (version "1.11.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "webcolors" version)) + (sha256 + (base32 "1rkda75h2p65zx6r84c9mjavn4xpviqvqrklvdvcklapd5in1wvn")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest"))))))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (home-page "https://github.com/ubernostrum/webcolors") + (synopsis "HTML/CSS color definitions library") + (description "@code{python-webcolors} is a module for working with +HTML/CSS color definitions. Normalizing and converting between the following +formats is supported. + +@itemize +@item Specification-defined color names +@item Six-digit hexadecimal +@item Three-digit hexadecimal +@item Integer rgb() triplet +@item Percentage rgb() triplet +@end itemize + +Only the RGB colorspace is supported. Conversion to/from the HSL colorspace +can be handled by the @code{colorsys} module in the Python standard library.") + (license license:bsd-3))) -- cgit v1.2.3