summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2024-05-10 00:53:06 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-10-14 23:53:14 +0100
commit580bc390777d9c2f73c7c7e57f1225f4db40e7ce (patch)
treed0360d9778c59aa7952d170e8a8279128ae29bb0
parent68ac819f93fe87bf66353ebaad4f92577f9b3427 (diff)
gnu: python-django-localflavor: Move to pyproject-build-system.
* gnu/packages/django.scm (python-django-localflavor): [build-system]: Move to pyproject-build-system. [arguments]<#:phases>: Rewrite check phase replacement. <#:test-flags>: Use it. [native-inputs]: Remove them. Not needed with the check phase rewrite. Change-Id: Ie50baab2cb102585ee25e3264e00eebe370f4cb2 Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
-rw-r--r--gnu/packages/django.scm23
1 files changed, 10 insertions, 13 deletions
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index cd50f9cf6c..78bc8afde1 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -286,20 +286,17 @@ commands, additional database fields and admin extensions.")
(uri (pypi-uri "django-localflavor" version))
(sha256
(base32 "0i1s0ijfd9rv2cp5x174jcyjpwn7fyg7s1wpbvlwm96bpdvs6bxc"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key inputs outputs tests? #:allow-other-keys)
- (when tests?
- (add-installed-pythonpath inputs outputs)
- (setenv "PYTHONPATH"
- (string-append ".:"
- (getenv "GUIX_PYTHONPATH")))
- (invoke "invoke" "test")))))))
- (native-inputs
- (list python-coverage python-invoke python-pytest-django which))
+ (list
+ #:test-flags '(list "--settings=tests.settings" "tests")
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? test-flags #:allow-other-keys)
+ (if tests?
+ (apply invoke "python" "-m" "django" "test" test-flags)
+ (format #t "test suite not run~%")))))))
(propagated-inputs
(list python-django python-stdnum))
(home-page "https://django-localflavor.readthedocs.io/en/latest/")