mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-redis: Update to 4.5.2 and enable tests.
* gnu/packages/databases.scm (python-redis): Update to 4.5.2. [source]: Fetch from git. [build-system]: Use pyproject-build-system. [arguments]: Enable tests. Add #:test-flags and #:phases. [native-inputs]: Add field. [propagated-inputs]: Add field. [home-page]: Update URL.
This commit is contained in:
parent
20fa738123
commit
1a902eb21a
1 changed files with 49 additions and 14 deletions
|
@ -4000,20 +4000,55 @@ reasonable substitute.")
|
||||||
(define-public python-redis
|
(define-public python-redis
|
||||||
(package
|
(package
|
||||||
(name "python-redis")
|
(name "python-redis")
|
||||||
(version "3.5.3")
|
(version "4.5.2")
|
||||||
(source
|
(source (origin
|
||||||
(origin
|
;; The PyPI archive lacks some test resources such as the TLS
|
||||||
(method url-fetch)
|
;; certificates under docker/stunnel/keys.
|
||||||
(uri (pypi-uri "redis" version))
|
(method git-fetch)
|
||||||
(sha256
|
(uri (git-reference
|
||||||
(base32 "18h5b87g15x3j6pb1h2q27ri37p2qpvc9n2wgn5yl3b6m3y0qzhf"))))
|
(url "https://github.com/redis/redis-py")
|
||||||
(build-system python-build-system)
|
(commit (string-append "v" version))))
|
||||||
;; Tests require a running Redis server.
|
(file-name (git-file-name name version))
|
||||||
(arguments '(#:tests? #f))
|
(sha256
|
||||||
;; As long as we are not running test, we do not need this input :-)
|
(base32
|
||||||
;;(native-inputs
|
"0cz3gji3rb1h5dczyl11hm42wgsbz5v896cgbi14dij160b7m35i"))))
|
||||||
;; `(("python-pytest" ,python-pytest)))
|
(build-system pyproject-build-system)
|
||||||
(home-page "https://github.com/andymccurdy/redis-py")
|
(arguments
|
||||||
|
(list
|
||||||
|
#:test-flags
|
||||||
|
#~(list "-m"
|
||||||
|
;; These tests are disabled in the official CI run (see:
|
||||||
|
;; https://raw.githubusercontent.com/redis/redis-py/master/
|
||||||
|
;; .github/workflows/install_and_test.sh).
|
||||||
|
(string-append "not onlycluster "
|
||||||
|
"and not redismod "
|
||||||
|
"and not ssl")
|
||||||
|
"-k" (string-append
|
||||||
|
;; The autoclaim test fails with "AssertionError: assert
|
||||||
|
;; [b'0-0', [], []] == [b'0-0', []]".
|
||||||
|
"not test_xautoclaim "
|
||||||
|
;; These tests cause the following error: "Error 111
|
||||||
|
;; connecting to localhost:6380. Connection refused."
|
||||||
|
;; (see: https://github.com/redis/redis-py/issues/2109).
|
||||||
|
"and not test_sync "
|
||||||
|
"and not test_psync"))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
;; Tests require a running Redis server.
|
||||||
|
(add-before 'check 'start-redis
|
||||||
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
|
(when tests?
|
||||||
|
(invoke "redis-server" "--daemonize" "yes"
|
||||||
|
"--enable-debug-command" "yes"
|
||||||
|
"--enable-module-command" "local")))))))
|
||||||
|
(native-inputs
|
||||||
|
(list python-pytest
|
||||||
|
python-pytest-asyncio
|
||||||
|
python-pytest-timeout
|
||||||
|
redis))
|
||||||
|
(propagated-inputs
|
||||||
|
(list python-async-timeout))
|
||||||
|
(home-page "https://github.com/redis/redis-py")
|
||||||
(synopsis "Redis Python client")
|
(synopsis "Redis Python client")
|
||||||
(description
|
(description
|
||||||
"This package provides a Python interface to the Redis key-value store.")
|
"This package provides a Python interface to the Redis key-value store.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue