diff mbox series

[bug#65758,v7,30/57] gnu: python-django-compressor: Update to 4.3.1.

Message ID 3f885f6e4a65e18ebb5c9e24118f1d11c1a0e449.1693991781.git.ngraves@ngraves.fr
State New
Headers show
Series [bug#65758,v7,01/57] gnu: python-django-4.0: Update to 4.0.9. | expand

Commit Message

Nicolas Graves Sept. 6, 2023, 9:15 a.m. UTC
* gnu/packages/django.scm (python-django-compressor): Update to 4.3.1.
[build-system]: Use pyproject-build-system.
[arguments](phases): Set DJANGO_SETTINGS_MODULE in the invoke call and adapt
phase 'check to argument test-flags.
(test-flags): Add argument.
(tests?) : Delete argument.
---
 gnu/packages/django.scm | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 00a83ab06d..008c5a44f2 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -1197,28 +1197,25 @@  (define-public python-django-crispy-forms
 (define-public python-django-compressor
   (package
     (name "python-django-compressor")
-    (version "2.4.1")
+    (version "4.3.1")
     (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "django_compressor" version))
-        (sha256
-         (base32 "1q0m0hfg7sqmj5km924g4dgy3nx51aszzsprlp6gsin10mv0fn1k"))))
-    (build-system python-build-system)
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "django_compressor" version))
+       (sha256
+        (base32 "0hl9bwdiif6pn37fw2fpm56i3vcapb1qcb82kb19q2fclq6qr1b8"))))
+    (build-system pyproject-build-system)
     (arguments
-     '(#:phases
+     '(#:test-flags '("-k" "not test_clamjs_filter")
+       #:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
+           (lambda* (#:key tests? test-flags #: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))
+                 (apply invoke "django-admin" "test"
+                        "--pythonpath=." "--settings=compressor.test_settings"
+                        test-flags)
+                 (format #t "test suite not run~%")))))))
     (propagated-inputs
      (list python-django-appconf python-rcssmin python-rjsmin))
     (native-inputs