summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-04-18 09:17:07 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-05-12 12:45:53 -0400
commiteba07849372b978f65815b825955b799ccbb2866 (patch)
treea81e794ee67adeb655a0f941e655e0730f4fea76 /gnu/packages
parent0d585039704e9c6848d92f4f85a90dec49049a97 (diff)
gnu: Add python-aioredis.
* gnu/packages/databases.scm (python-aioredis): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/databases.scm35
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 40741a9bd2..8a6ace3ed9 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -3963,6 +3963,41 @@ parsing code in hiredis. It primarily speeds up parsing of multi bulk replies."
(define-public python2-hiredis
(package-with-python2 python-hiredis))
+(define-public python-aioredis
+ (package
+ (name "python-aioredis")
+ (version "2.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "aioredis" version))
+ (sha256
+ (base32 "13nrkk45az6qdiwfpbw80ls6bfip0i27qlkh9gsp2b9zk6pim9ga"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (add-before 'check 'start-redis
+ (lambda _
+ (invoke "redis-server" "--daemonize" "yes")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv")))))))
+ (native-inputs
+ (list python-pytest
+ python-pytest-asyncio
+ python-uvloop
+ redis))
+ (propagated-inputs
+ (list python-async-timeout
+ python-hiredis
+ python-typing-extensions))
+ (home-page "https://github.com/aio-libs/aioredis-py")
+ (synopsis "Redis support for Python's @code{asyncio} module")
+ (description "This package provides Redis support for the Python
+@code{asyncio} (PEP 3156) module.")
+ (license license:expat)))
+
(define-public python-fakeredis
(package
(name "python-fakeredis")