aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/django.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2020-07-21 14:30:59 +0300
committerEfraim Flashner <efraim@flashner.co.il>2020-07-21 15:30:09 +0300
commitda3dbd61edc57007c78f51de45b6cbcafdfce844 (patch)
tree7f5c35bc3234bb2b081313c004acc75f6e25b269 /gnu/packages/django.scm
parent4fa01b7821f24d97228c657dabf1e66c82899146 (diff)
downloadguix-da3dbd61edc57007c78f51de45b6cbcafdfce844.tar
guix-da3dbd61edc57007c78f51de45b6cbcafdfce844.tar.gz
gnu: Add python-django-compressor.
* gnu/packages/django.scm (python-django-compressor): New variable.
Diffstat (limited to 'gnu/packages/django.scm')
-rw-r--r--gnu/packages/django.scm46
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 119d23dadc..d2faff357e 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -34,6 +34,7 @@
#:use-module (gnu packages check)
#:use-module (gnu packages geo)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-compression)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages sphinx)
@@ -1198,6 +1199,51 @@ a single block.")
forms using your favorite CSS framework, without writing template code.")
(license license:expat)))
+(define-public python-django-compressor
+ (package
+ (name "python-django-compressor")
+ (version "2.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "django_compressor" version))
+ (sha256
+ (base32
+ "0kx7bclfa0sxlsz6ka70zr9ra00lks0hmv1kc99wbanx6xhirvfj"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (begin
+ (setenv "DJANGO_SETTINGS_MODULE" "compressor.test_settings")
+ (invoke "django-admin" "test"
+ "--pythonpath=."))
+ #t))))
+ ;; Tests fail with beautifulsoup 4.9+
+ ;; https://github.com/django-compressor/django-compressor/issues/998
+ #:tests? #f))
+ (propagated-inputs
+ `(("python-django-appconf" ,python-django-appconf)
+ ("python-rcssmin" ,python-rcssmin)
+ ("python-rjsmin" ,python-rjsmin)))
+ (native-inputs
+ `(("python-beautifulsoup4" ,python-beautifulsoup4)
+ ("python-brotli" ,python-brotli)
+ ("python-csscompressor" ,python-csscompressor)
+ ("python-django-sekizai" ,python-django-sekizai)
+ ("python-mock" ,python-mock)))
+ (home-page "https://django-compressor.readthedocs.io/en/latest/")
+ (synopsis
+ "Compress linked and inline JavaScript or CSS into single cached files")
+ (description
+ "Django Compressor combines and compresses linked and inline Javascript or
+CSS in a Django templates into cacheable static files by using the compress
+template tag.")
+ (license license:expat)))
+
(define-public python-django-override-storage
(package
(name "python-django-override-storage")