gnu: python-django-contact-form: Update to 5.2.0.

* gnu/packages/django.scm (python-django-contact-form): Update to 5.2.0.
[source]: Update URI.
[build-system]: Use pyproject-build-system.
[arguments]<#:phases>: In the custom 'check' phase, respect '#:tests?',
delete a file and use a more standard Django testing procedure.
[native-inputs]: Remove python-coverage. Add python-pdm-backend,
python-tzdata.

Change-Id: I4a3209e45eb506bf24cac3e1b5ad80c0ca47c463
This commit is contained in:
Vinicius Monego 2025-07-16 22:35:55 -03:00
parent 821a42d2fc
commit a2972392a2
No known key found for this signature in database
GPG key ID: 637B0B138065B68A

View file

@ -848,23 +848,27 @@ project aims to bulk update given objects using one query over Django ORM.")
(define-public python-django-contact-form
(package
(name "python-django-contact-form")
(version "1.9")
(version "5.2.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "django-contact-form" version))
(uri (pypi-uri "django_contact_form" version))
(sha256
(base32
"1my9hkrylckp5vfqg9b0kncrdlxjnwxll56sdciqn4v19i4wbq1y"))))
(build-system python-build-system)
"091nji94c6d2n8zfpsfhwdv417ligi1hfwr4vvydbggf3s4q392n"))))
(build-system pyproject-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "coverage" "run" "--source" "contact_form"
"runtests.py"))))))
(list
#:phases #~(modify-phases %standard-phases
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
;; This file contains a single test that requires
;; python-akismet (not yet packaged).
(delete-file "tests/test_akismet_integration.py")
(setenv "DJANGO_SETTINGS_MODULE" "tests.test_settings")
(invoke "django-admin" "test" "--pythonpath=.")))))))
(native-inputs
(list python-coverage))
(list python-pdm-backend python-tzdata))
(propagated-inputs
(list python-django))
(home-page "https://github.com/ubernostrum/django-contact-form")