gnu: Add python-validators.

* gnu/packages/python-xyz.scm (python-validators, python2-validators): New
public variables.
This commit is contained in:
Marius Bakke 2020-03-20 22:00:51 +01:00
parent 9f9335277f
commit 28030d290a
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA

View File

@ -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")