summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-01-21 20:29:56 +0100
committerMarius Bakke <marius@gnu.org>2022-01-22 10:23:00 +0100
commitaec7c0cb447161bdaa0ac7e1d41feebb75cd3b7b (patch)
tree35336e3ea14c45d547587dcdb056d8bff1063068
parent16f9ca544d3ded9502ae2b75dbffba8f6e939e76 (diff)
gnu: Add python-typeguard.
* gnu/packages/python-xyz.scm (python-typeguard): New variable.
-rw-r--r--gnu/packages/python-xyz.scm31
1 files changed, 31 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f16771173c..1afc1a2850 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21363,6 +21363,37 @@ Python 3.6+ type hints.")
;; MIT license
(license license:expat)))
+(define-public python-typeguard
+ (package
+ (name "python-typeguard")
+ (version "2.13.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "typeguard" version))
+ (sha256
+ (base32 "1i5qzcyw2715h1g1hvj7fxykck2bkxyshpngjr3nfcx1lf6smv80"))))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv" "-k"
+ ;; XXX: These fail when installed as a library:
+ ;; https://github.com/agronholm/typeguard/issues/176
+ "not usefixtures and not test_cached_module")))))))
+ (native-inputs
+ (list python-mypy python-pytest python-typing-extensions))
+ (home-page "https://github.com/agronholm/typeguard")
+ (synopsis "Run-time type checker for Python")
+ (description
+ "@code{typeguard} provides run-time type checking for functions defined
+with PEP 484 argument (and return) type annotations.")
+ (license license:expat)))
+
(define-public python-typing
(package
(name "python-typing")