From b939953b9a415d450dd8d3906114e67bf7ecad5c Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sun, 23 Apr 2017 16:54:53 +0200 Subject: gnu: Add python-django-redis. * gnu/packages/django.scm (python-django-redis, python2-django-redis): New variables. --- gnu/packages/django.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index 129aa25806..eeccfcc2fa 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -25,6 +25,7 @@ #:use-module (guix build-system python) #:use-module (gnu packages) #:use-module (gnu packages base) + #:use-module (gnu packages databases) #:use-module (gnu packages python)) (define-public python-django @@ -471,3 +472,40 @@ project.") (define-public python2-django-overextends (package-with-python2 python-django-overextends)) + +(define-public python-django-redis + (package + (name "python-django-redis") + (version "4.7.0") + (source (origin + (method url-fetch) + (uri (pypi-uri "django-redis" version)) + (sha256 + (base32 + "0yyyxv8n9l9dhs893jsqwg2cxqkkc79g719n9dzzzqgkzialv1c1")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (and (zero? (system* "redis-server" "--daemonize" "yes")) + (with-directory-excursion "tests" + (zero? (system* "python" "runtests.py"))))))))) + (native-inputs + `(("python-fakeredis" ,python-fakeredis) + ("python-hiredis" ,python-hiredis) + ("python-mock" ,python-mock) + ("python-msgpack" ,python-msgpack) + ("redis" ,redis))) + (propagated-inputs + `(("python-django" ,python-django) + ("python-redis" ,python-redis))) + (home-page "https://github.com/niwibe/django-redis") + (synopsis "Full featured redis cache backend for Django") + (description + "Full featured redis cache backend for Django.") + (license license:bsd-3))) + +(define-public python2-django-redis + (package-with-python2 python-django-redis)) -- cgit v1.2.3