diff mbox series

[bug#55474,04/18] gnu: Add python-django-treebeard.

Message ID 20220517075448.32638-4-ngraves@ngraves.fr
State New
Headers show
Series [bug#55474,01/18] gnu: python-django-taggit: Update to 2.1.0. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Nicolas Graves May 17, 2022, 7:54 a.m. UTC
* gnu/packages/django.scm (python-django-treebeard): New variable.
---
 gnu/packages/django.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index fee4278708..0755b5d9fe 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -334,6 +334,39 @@  (define-public python-django-taggit
      "Django-taggit is a reusable Django application for simple tagging.")
     (license license:bsd-3)))
 
+(define-public python-django-treebeard
+  (package
+    (name "python-django-treebeard")
+    (version "4.5.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "django-treebeard" version))
+       (sha256
+        (base32 "1nk9b40cp0jsxr3qsb16mh9xr0z3cvf69yp5ahh70fajf8bh05c0"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? inputs #:allow-other-keys)
+             (if tests?
+                 (lambda _
+                   (setenv "PYTHONPATH"
+                           (string-append ".:" (getenv "GUIX_PYTHONPATH")))
+                   (setenv "DJANGO_SETTINGS_MODULE" "treebeard.tests.settings")
+                   (substitute* "setup.py" ((".*pythonpath.*") ""))
+                   (invoke "pytest" "-vv"))
+                 (format #t "test suite not run~%")))))))
+    (propagated-inputs (list python-django
+                             python-sqlparse))
+    (native-inputs (list python-wheel
+                         python-pytest-django))
+    (home-page "https://github.com/django-treebeard/django-treebeard/")
+    (synopsis "Efficient tree implementations for Django")
+    (description "This package provides an efficient tree implementations for Django.")
+    (license license:bsd-3)))
+
 (define-public python-easy-thumbnails
   (package
     (name "python-easy-thumbnails")