Subject: [bug#65758] [PATCH v6 30/55] gnu: python-django-compressor: Update to 4.3.1.

From: Nicolas Graves <[email-masked]>
Date: Tue, 5 Sep 2023 18:31:06 +0200

* 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 --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index a741eb64a0..fa36b2c5b3 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -1194,28 +1194,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
-- 
2.41.0