gnu: python-hiredis: Update to 2.2.2 and enable tests.

* gnu/packages/databases.scm (python-hiredis): Update to 2.2.2.
[source]: Fetch via git and apply patches.
[build-system]: Use pyproject-build-system.
[arguments]: Enable tests.  Add #:phases.
[native-inputs]: New field.
[inputs]: Likewise.
* gnu/packages/patches/python-hiredis-fix-header.patch: New file.
* gnu/packages/patches/python-hiredis-use-system-hiredis.patch: Likewise.
* gnu/local.mk (dist_patch_DATA): Register them.
This commit is contained in:
Maxim Cournoyer 2023-03-18 22:07:42 -04:00
parent 9956638943
commit 20fa738123
No known key found for this signature in database
GPG key ID: 1260E46482E63562
4 changed files with 155 additions and 11 deletions

View file

@ -3904,18 +3904,29 @@ for Python. The design goals are:
(define-public python-hiredis
(package
(name "python-hiredis")
(version "0.2.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "hiredis" version))
(sha256
(base32
"1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
(build-system python-build-system)
(version "2.2.2")
(source (origin
(method git-fetch) ;for tests
(uri (git-reference
(url "https://github.com/redis/hiredis-py")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"066rm5m7aa8skm0a57cf45153bwmbl9yyi4s60an14hb25n947gi"))
(patches
(search-patches "python-hiredis-fix-header.patch"
"python-hiredis-use-system-hiredis.patch"))))
(build-system pyproject-build-system)
(arguments
;; no tests
`(#:tests? #f))
(list #:phases #~(modify-phases %standard-phases
(add-before 'check 'delete-extraneous-__init__.py
(lambda _
;; The fix was forwarded upstream, see:
;; https://github.com/redis/hiredis-py/pull/160.
(delete-file "tests/__init__.py"))))))
(native-inputs (list python-pytest))
(inputs (list hiredis))
(home-page "https://github.com/redis/hiredis-py")
(synopsis "Python extension that wraps protocol parsing code in hiredis")
(description "Python-hiredis is a python extension that wraps protocol