guix-patches
[Top][All Lists]
Advanced

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

[bug#55474] [PATCH v2 04/17] gnu: Add python-django-treebeard.


From: Nicolas Graves
Subject: [bug#55474] [PATCH v2 04/17] gnu: Add python-django-treebeard.
Date: Tue, 9 Aug 2022 19:13:19 +0200

* gnu/packages/django.scm (python-django-treebeard): New variable.
---
 gnu/packages/django.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index dfd799faba..617c897ba8 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -352,6 +352,47 @@ (define-public python-django-taggit
 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 @code{django-treebeard}, an efficient tree
+implementations for Django.  It includes 3 different tree implementations
+with the same API:
+@itemize
+@item Adjacency List
+@item Materialized Path
+@item Nested Sets
+@end itemize")
+    (license license:bsd-3)))
+
 (define-public python-easy-thumbnails
   (package
     (name "python-easy-thumbnails")
-- 
2.37.1






reply via email to

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