diff mbox series

[bug#65758,v7,54/57] gnu: Add python-wagtail-localize.

Message ID c794d52da00da7f0beaa11e28f23dd1a32a962aa.1693991781.git.ngraves@ngraves.fr
State New
Headers show
Series [bug#65758,v7,01/57] gnu: python-django-4.0: Update to 4.0.9. | expand

Commit Message

Nicolas Graves Sept. 6, 2023, 9:16 a.m. UTC
* gnu/packages/django.scm (python-wagtail-localize): New variable.
---
 gnu/packages/django.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 46be4f6f71..6bcdf700a6 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -1807,3 +1807,43 @@  (define-public python-wagtail-factories
     (description "This package provides factory boy classes for
 @code{wagtail}.  It is used for the migrating streamfields.")
     (license license:expat)))
+
+(define-public python-wagtail-localize
+  (package
+    (name "python-wagtail-localize")
+    (version "1.5.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/wagtail/wagtail-localize")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "143rwwz94wlqwbckg8ccfxkn5ydb1mzr9dqn4zldpsrbgg3p4cj6"))))
+    (build-system pyproject-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; TODO Remove this when moving to recent versions of flit-core.
+         (add-after 'unpack 'fix-flit-core-glob
+           (lambda _
+             (substitute* "pyproject.toml"
+               (("wagtail_localize\\/\\*\\*\\/tests")
+                (string-join
+                 (find-files "." "tests$" #:directories? #t)
+                 "\",\n    \"")))))
+         (replace 'check
+           (lambda* (#:key tests? inputs #:allow-other-keys)
+             (if tests?
+                 (invoke "python" "testmanage.py")
+                 (format #t "test suite not run~%")))))))
+    (propagated-inputs (list python-django python-polib python-wagtail))
+    (native-inputs (list python-dj-database-url
+                         python-flit-core
+                         python-freezegun
+                         python-typing-extensions))
+    (home-page "https://www.wagtail-localize.org")
+    (synopsis "Translating for Wagtail Content Management System (CMS)")
+    (description "This package provides a translation plugin for Wagtail CMS.")
+    (license license:bsd-3)))