gnu: Add python-aioredis.

* gnu/packages/databases.scm (python-aioredis): New variable.
This commit is contained in:
Maxim Cournoyer 2022-04-18 09:17:07 -04:00
parent 0d58503970
commit eba0784937
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -3963,6 +3963,41 @@ (define-public python-hiredis
(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")