From 28030d290a9f690800d6ed7c7d0b217d7452b321 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 20 Mar 2020 22:00:51 +0100 Subject: gnu: Add python-validators. * gnu/packages/python-xyz.scm (python-validators, python2-validators): New public variables. --- gnu/packages/python-xyz.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index ed5fba5282..93b735f1c9 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -14062,6 +14062,41 @@ validation of URIs (see RFC 3986) and IRIs (see RFC 3987).") (define-public python2-rfc3987 (package-with-python2 python-rfc3987)) +(define-public python-validators + (package + (name "python-validators") + (version "0.14.2") + (source (origin + (method url-fetch) + (uri (pypi-uri "validators" version)) + (sha256 + (base32 + "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi")))) + (build-system python-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "pytest" "-vv")))))) + (propagated-inputs + `(("python-decorator" ,python-decorator) + ("python-six" ,python-six))) + (native-inputs + `(("python-flake8" ,python-flake8) + ("python-isort" ,python-isort) + ("python-pytest" ,python-pytest))) + (home-page "https://github.com/kvesteri/validators") + (synopsis "Data validation library") + (description + "This package contains validators for different things such as email +addresses, IP addresses, URLs, hashes and more. It has been designed to +be easy to use and not require defining a schema or form just to validate +some input.") + (license license:expat))) + +(define-public python2-validators + (package-with-python2 python-validators)) + (define-public python-validate-email (package (name "python-validate-email") -- cgit v1.2.3