From c3b110b27ab6b111a279b6c033543ced1614d1be Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 19 Mar 2023 23:52:13 -0400 Subject: gnu: python-fakeredis: Update to 2.10.1 and enable tests. * gnu/packages/databases.scm (python-fakeredis): Update to 2.10.1. [source]: Fetch via git. [build-system]: Use pyproject-build-system. [arguments]: Enable tests. Add #:phases. [native-inputs]: New field. [propagated-inputs]: Remove python-aioredis and python-packaging. [home-page]: Update URL. --- gnu/packages/databases.scm | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index acb17f5a4e..080645708d 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -3971,21 +3971,28 @@ (define-public python-aioredis (define-public python-fakeredis (package (name "python-fakeredis") - (version "1.7.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "fakeredis" version)) - (sha256 - (base32 - "1v68my2v7fg44zwky3k5d52nn1bi0szpgdslghrpa2ifnjhlnb3w")))) - (build-system python-build-system) + (version "2.10.1") + (source (origin + (method git-fetch) ;for tests + (uri (git-reference + (url "https://github.com/cunla/fakeredis-py") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1imsi9dswvkda894sm53lfzdsna0qlrgxszczlq2sam68zn4hfz6")))) + (build-system pyproject-build-system) (arguments - ;; no tests - `(#:tests? #f)) - (propagated-inputs - (list python-aioredis python-packaging python-redis python-sortedcontainers)) - (home-page "https://github.com/jamesls/fakeredis") + (list #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'relax-requirements + (lambda _ + (substitute* "pyproject.toml" + (("sortedcontainers = \"\\^2\\.4\"") + "sortedcontainers = \"^2.1\""))))))) + (native-inputs (list python-poetry-core python-pytest + python-pytest-asyncio python-pytest-mock)) + (propagated-inputs (list python-redis python-sortedcontainers)) + (home-page "https://github.com/cunla/fakeredis-py") (synopsis "Fake implementation of redis API for testing purposes") (description "Fakeredis is a pure-Python implementation of the redis-py Python client -- cgit v1.2.3