From 9f4fabc011df159dc637ac48c06d0d9c7a4bc2fe Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Mon, 29 Sep 2025 08:05:50 +0200 Subject: [PATCH] gnu: python-django-crispy-forms: Update to 2.4. * gnu/packages/django.scm (python-django-crispy-forms): Update to 2.4. [source]: Switch to git-fetch. [build-system]: Switch to pyproject-build-system. [native-inputs]: Add bootstrap variants of python-crispy-bootstrap3 and python-crispy-bootstrap4. Add python-pytest, python-pytest-django, python-setuptools. Change-Id: I52f3ef0db0fde966fa4a9598b474ee446ef6eaab Signed-off-by: Sharlatan Hellseher --- gnu/packages/django.scm | 45 ++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index 70483c1a755..88f3ce92d1e 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -1607,22 +1607,43 @@ a single block.") (define-public python-django-crispy-forms (package (name "python-django-crispy-forms") - (version "1.9.2") + (version "2.4") (source (origin - (method url-fetch) - (uri (pypi-uri "django-crispy-forms" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/django-crispy-forms/django-crispy-forms") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 - "0fxlf233f49hjax786p4r650rd0ilvhnpyvw8hv1d1aqnkxy1wgj")))) - (build-system python-build-system) + (base32 "1xrrcsv534p989hh1jgy4nk6sxay7g913z6zxwgpgnadzr9dfpk1")))) + (build-system pyproject-build-system) (arguments - '(;; No included tests - #:tests? #f)) - (propagated-inputs - (list python-django)) - (home-page - "http://github.com/maraujop/django-crispy-forms") + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda _ + (setenv "PYTHONPATH" ".")))))) + (native-inputs + (append + ;; XXX: python-crispy-boostrap packages and this package have a + ;; circular dependency. Get a bootstrap version for them. + (map (lambda (pkg) + (package/inherit pkg + (arguments + (list + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (delete 'sanity-check)))) + (propagated-inputs + (modify-inputs (package-propagated-inputs pkg) + (delete "python-django-crispy-forms"))))) + (list python-crispy-bootstrap3 python-crispy-bootstrap4)) + (list python-pytest python-pytest-django python-setuptools))) + (propagated-inputs (list python-django)) + (home-page "https://github.com/django-crispy-forms/django-crispy-forms") (synopsis "Tool to control Django forms without custom templates") (description "@code{django-crispy-forms} lets you easily build, customize and reuse