guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 4c6c159bece6dde42be71d76952592b47edff307
Author: Nicolas Graves <[email protected]>
AuthorDate: Sun Sep 28 18:46:33 2025 +0200

    gnu: python-django-gravatar2: Switch to pyproject.
    
    * gnu/packages/django.scm (python-django-gravatar2):
    [source]: Switch to git-fetch.
    [build-system]: Switch to pyproject-build-system.
    [arguments]<#:phases>: Replace 'check phase.
    [native-inputs]: Add python-setuptools.
    
    Change-Id: I1f877ef89ebc0728a8e21d33a4e869c0be1f3816
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/django.scm | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index ab6f6209ac..7d5f6a1da5 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -734,17 +734,27 @@ queries done via the Django ORM, SQLAlchemy generated 
queries are displayed.")
     (version "1.4.5")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "django-gravatar2" version))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/twaddington/django-gravatar";)
+             (commit version)))
+       (file-name (git-file-name name version))
        (sha256
-        (base32
-         "0r03m1qkh56g92x136xdq8n92mj7gbi1fh0djarxhp9rbr35dfrd"))))
-    (build-system python-build-system)
+        (base32 "0brh1176gx758cimkz36g8v760a1hadxspqanp8kc59kvx50qvm0"))))
+    (build-system pyproject-build-system)
     (arguments
-     '(;; TODO: The django project for the tests is missing from the release.
-       #:tests? #f))
-    (inputs
-     (list python-django))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (with-directory-excursion "example_project"
+                  (invoke "python" "./manage.py" "test"
+                          "-k" "not test_has_gravatar"
+                          "django_gravatar"))))))))
+    (native-inputs (list python-setuptools))
+    (inputs (list python-django))
     (home-page "https://github.com/twaddington/django-gravatar";)
     (synopsis "Gravatar support for Django, improved version")
     (description

Reply via email to