guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#55474] [PATCH v5 24/55] gnu: python-django-sortedm2m: Update to 3.1


From: Nicolas Graves
Subject: [bug#55474] [PATCH v5 24/55] gnu: python-django-sortedm2m: Update to 3.1.1-0-ddf321f.
Date: Sun, 25 Jun 2023 18:57:25 +0200

* gnu/packages/django.scm (python-django-sortedm2m): Update to 3.1.1-0-ddf321f.
[build-system]: Use pyproject-build-system.
[arguments](tests?): Disable tests.
(phases): Execute phase 'check command when tests?.
[native-inputs]: Add python-psycopg2.
---
 gnu/packages/django.scm | 57 ++++++++++++++++++++++++-----------------
 1 file changed, 33 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index b5830234b4..a741eb64a0 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -973,32 +973,41 @@ (define-public python-django-q
     (license license:expat)))
 
 (define-public python-django-sortedm2m
-  (package
-    (name "python-django-sortedm2m")
-    (version "3.0.2")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "django-sortedm2m" version))
-              (sha256
-               (base32
-                "0z0yymmrr2l5cznqbzwziw624df0qsiflvbpqwrpan52nww3dk4a"))))
-    (build-system python-build-system)
-    (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (replace 'check
-                    (lambda _
-                      (invoke "django-admin"
-                              "test" "--settings=test_project.settings"
-                              "--pythonpath=."))))))
-    (propagated-inputs
-     (list python-django-3.2))
-    (home-page "https://github.com/jazzband/django-sortedm2m";)
-    (synopsis "Drop-in replacement for django's own ManyToManyField")
-    (description
-      "Sortedm2m is a drop-in replacement for django's own ManyToManyField.
+  (let ((commit "ddf321fc9736b9a9477d496c60250270111cf2ce")
+        (revision "0"))
+    (package
+      (name "python-django-sortedm2m")
+      (version (git-version "3.1.1" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/jazzband/django-sortedm2m";)
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "1j08xyvlc5dypd26p48v0dj3k5g5ssrygvdy8zgg64g3iw8sw7v3"))))
+      (build-system pyproject-build-system)
+      (arguments
+       `(#:tests? #f ; require a running postgresql server
+         #:phases
+         (modify-phases %standard-phases
+           (replace 'check
+             (lambda* (#:key tests? #:allow-other-keys)
+               (when tests?
+                 (invoke "django-admin"
+                         "test" "--settings=test_project.settings"
+                         "--pythonpath=.")))))))
+      (native-inputs
+       (list python-psycopg2))
+      (propagated-inputs
+       (list python-django))
+      (home-page "https://github.com/jazzband/django-sortedm2m";)
+      (synopsis "Drop-in replacement for django's own ManyToManyField")
+      (description
+       "Sortedm2m is a drop-in replacement for django's own ManyToManyField.
 The provided SortedManyToManyField behaves like the original one but remembers
 the order of added relations.")
-    (license license:bsd-3)))
+      (license license:bsd-3))))
 
 (define-public python-django-appconf
   (package
-- 
2.40.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]