rekado pushed a commit to branch master
in repository guix.

commit 5c2032eedf5c1e7b2c30c2b1e50df91e9fa7f1b7
Author: Ricardo Wurmus <[email protected]>
AuthorDate: Sun Jan 12 17:56:17 2025 +0100

    gnu: python-django-simple-math-captcha: Update to 2.0.0.
    
    * gnu/packages/django.scm (python-django-simple-math-captcha): Update to
    2.0.0.
    [build-system]: Use pyproject-build-system.
    [arguments]: Add phase 'compatibility; run tests conditionally.
    [native-inputs]: Add python-setuptools and python-wheel.
    
    Change-Id: I93a7e5f351a8d15941a6c29cca72708c81f677a3
---
 gnu/packages/django.scm | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index ea7a7508cf..3bb0847f84 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -313,34 +313,34 @@ that are useful for particular countries or cultures.")
 (define-public python-django-simple-math-captcha
   (package
     (name "python-django-simple-math-captcha")
-    (version "1.0.9")
+    (version "2.0.0")
     (home-page "https://github.com/alsoicode/django-simple-math-captcha";)
     (source (origin
               (method git-fetch)
               (uri (git-reference
                     (url home-page)
-                    (commit (string-append "v" version))))
+                    (commit version)))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0fhy9k8haqa1296v0qpg1b5w7y3pyw9qi9z9laj5ijry1gk35qaw"))))
-    (build-system python-build-system)
+                "1pqriqvg1bfx36p8hxzh47zl5qk911vgf3xaxfvhkjyi611rbxzy"))))
+    (build-system pyproject-build-system)
     (arguments
-     '(#:phases (modify-phases %standard-phases
-                  (add-after 'unpack 'patch-six-imports
-                    (lambda _
-                      ;; Django no longer bundles six, adjust the imports
-                      ;; accordingly.  The six dependency can likely be
-                      ;; removed in the next version.
-                      (substitute* (find-files "." "\\.py$")
-                        (("from django\\.utils import six")
-                         "import six"))
-                      #t))
-                  (replace 'check
-                    (lambda _
-                      (invoke "python" "runtests.py"))))))
+     (list
+      #:phases
+      '(modify-phases %standard-phases
+         (add-after 'unpack 'compatibility
+           (lambda _
+             (substitute* "test_simplemathcaptcha/form_tests.py"
+               (("label for=\"id_captcha_0\"") "label"))
+             (substitute* "simplemathcaptcha/widgets.py"
+               (("ugettext_lazy") "gettext_lazy"))))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "python" "runtests.py")))))))
     (native-inputs
-     (list python-mock))
+     (list python-mock python-setuptools python-wheel))
     (propagated-inputs
      (list python-django python-six))
     (synopsis "Easy-to-use math field/widget captcha for Django forms")

Reply via email to