aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/databases.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-18 22:07:42 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-20 08:32:32 -0400
commit20fa738123d005bb543a09974c5c981917d10264 (patch)
treed80908f112c94b80c26cd54aef3681900743cdd6 /gnu/packages/databases.scm
parent9956638943df3b9902055dd80df98035c014c56c (diff)
downloadguix-20fa738123d005bb543a09974c5c981917d10264.tar
guix-20fa738123d005bb543a09974c5c981917d10264.tar.gz
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.
Diffstat (limited to 'gnu/packages/databases.scm')
-rw-r--r--gnu/packages/databases.scm33
1 files changed, 22 insertions, 11 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 0de144e6b8..3a21f64819 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -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