aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-01-20 18:45:47 +0100
committerMarius Bakke <marius@gnu.org>2022-01-21 00:35:06 +0100
commit3e10dcabc056852dba62064bd0471f431d828dc3 (patch)
tree4d244ce51e8675019071f43f0499a0edd36440c0 /gnu
parentf001f30bdf371632b554792ac526a36a92ffa60c (diff)
downloadguix-3e10dcabc056852dba62064bd0471f431d828dc3.tar.gz
guix-3e10dcabc056852dba62064bd0471f431d828dc3.zip
gnu: python-django: Add a native search path for TZDIR.
* gnu/packages/django.scm (python-django-4.0)[native-search-paths]: Add TZDIR specification. (django-3.2)[native-search-paths]: Don't inherit. (python-django-rest-framework): Don't set TZDIR directly.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/django.scm12
1 files changed, 9 insertions, 3 deletions
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index d5f69b22da..410f4c59f4 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -118,6 +118,13 @@
;; This input is not strictly required, but in practice many Django
;; libraries need it for test suites and similar.
python-jinja2))
+ (native-search-paths
+ ;; Set TZDIR when 'tzdata' is available so that timezone functionality
+ ;; works (mostly) out of the box in containerized environments.
+ ;; Note: This search path actually belongs to 'glibc'.
+ (list (search-path-specification
+ (variable "TZDIR")
+ (files '("share/zoneinfo")))))
(home-page "https://www.djangoproject.com/")
(synopsis "High-level Python Web framework")
(description
@@ -138,6 +145,7 @@ to the @dfn{don't repeat yourself} (DRY) principle.")
(sha256
(base32
"0xbyl9fh9lk5hiwpw46s6hz98gs0fixrpq3myj5hh6vbbnz4mjb9"))))
+ (native-search-paths '()) ;no need for TZDIR
(propagated-inputs
(modify-inputs (package-propagated-inputs python-django-4.0)
;; Django 4.0 deprecated pytz in favor of Pythons built-in zoneinfo.
@@ -1033,9 +1041,7 @@ Django projects, which allows association of a number of tags with any
(replace 'check
(lambda* (#:key tests? inputs #:allow-other-keys)
(if tests?
- (begin
- (setenv "TZDIR" (search-input-directory inputs "share/zoneinfo"))
- (invoke "python" "runtests.py"))
+ (invoke "python" "runtests.py")
(format #t "test suite not run~%")))))))
(native-inputs
(list python-pytest python-pytest-django tzdata-for-tests))
-tooltip'>Before that '.log' files for scheme tests were fragmented and not included in test-suite.log. This unifies the semantics of SRFI-64 API with Automake test suite. * build-aux/test-driver.scm: New file. * Makefile.am (SCM_LOG_DRIVER, AM_SCM_LOG_DRIVER_FLAGS): New variables. (SCM_LOG_COMPILER, AM_SCM_LOG_FLAGS): Delete variables. (AM_TESTS_ENVIRONMENT): Set GUILE_AUTO_COMPILE to 0. * test-env.in: Silence guix-daemon. * doc/guix.texi (Running the Test Suite): Describe how to display the detailed results. Bug reports require only 'test-suite.log' file. * tests/base32.scm, tests/build-utils.scm, tests/builders.scm, tests/challenge.scm, tests/cpan.scm, tests/cpio.scm, tests/cran.scm, tests/cve.scm, tests/derivations.scm, tests/elpa.scm, tests/file-systems.scm, tests/gem.scm, tests/gexp.scm, tests/gnu-maintenance.scm, tests/grafts.scm, tests/graph.scm, tests/gremlin.scm, tests/hackage.scm, tests/hash.scm, tests/import-utils.scm, tests/lint.scm, tests/monads.scm, tests/nar.scm, tests/packages.scm, tests/pk-crypto.scm, tests/pki.scm, tests/profiles.scm, tests/publish.scm, tests/pypi.scm, tests/records.scm, tests/scripts-build.scm, tests/scripts.scm, tests/services.scm, tests/sets.scm, tests/size.scm, tests/snix.scm, tests/store.scm, tests/substitute.scm, tests/syscalls.scm, tests/system.scm, tests/ui.scm, tests/union.scm, tests/upstream.scm, tests/utils.scm: Don't exit at the end of test groups. * tests/containers.scm: Likewise. Use 'test-skip' instead of exiting with error code 77. Mathieu Lirzin 2016-03-06tests: Disable grafting by default for most tests....This allows tests to run as expected even in the presence of replacements among the bootstrap packages, such as Perl (commit d8173f21f7b4e3cb83541b8fa70621d2b6d4ce1c). * tests/cpan.scm: Add (%graft? #f). * tests/derivations.scm: Likewise. * tests/graph.scm: Likewise. * tests/monads.scm: Likewise. * tests/profiles.scm: Likewise. * tests/gexp.scm: Likewise. ("gexp->derivation vs. grafts"): Explicitly reenable grafting before, and disable it after, using 'set-grafting'. Ludovic Courtès 2016-01-13tests: Use sed instead of grep as a package with no dependencies....* tests/graph.scm ("node-edges"): Choose SED instead of GREP as the example. Ludovic Courtès 2016-01-02graph: %BAG-WITH-ORIGINS-NODE-TYPE includes the origin's guile....Before that it would include #f for most origins since that the default value of 'origin-patch-guile'. * guix/scripts/graph.scm (bag-node-edges): When 'origin-patch-guile' returns #f, use (default-guile). * tests/graph.scm ("bag DAG, including origins"): Check for an edge from O to (default-guile). Ludovic Courtès 2016-01-02graph: %BAG-EMERGED-NODE-TYPE filters out origins....Fixes <http://bugs.gnu.org/22280>. Reported by Leo Famulari <leo@famulari.name>. * guix/scripts/graph.scm (%bag-emerged-node-type)[edges]: Mimic %BAG-NODE-TYPE. This is a followup to 38b92da. Ludovic Courtès 2015-12-13graph: Add synthetic test....* tests/graph.scm ("node-transitive-edges, no duplicates"): New test. Ludovic Courtès 2015-11-23graph: Add '%bag-with-origins-node-type'....* guix/scripts/graph.scm (bag-node-edges): Remove 'filter' call. Add case for 'origin'. (%bag-node-type)[edges]: Add filtering here. (%bag-with-origins-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("bag DAG, including origins"): New test. * tests/guix-graph.sh: Add 'bag-with-origins'. * doc/guix.texi (Invoking guix graph): Document it. Ludovic Courtès 2015-11-21graph: Add procedures to query a node's edges....* guix/graph.scm (%node-edges, node-edges, node-back-edges) (node-transitive-edges): New procedures. * tests/graph.scm ("node-edges") ("node-transitive-edges + node-back-edges"): New tests. Ludovic Courtès 2015-11-21Add (guix graph)....* guix/scripts/graph.scm (<node-type>, <graph-backend>, emit-prologue) (emit-epilogue, emit-node, emit-edge, %graphviz-backend, export-graph): Move to... * guix/graph.scm: ... here. New file. * guix/scripts/system.scm, tests/graph.scm: Use it. * Makefile.am (MODULES): Add it. Ludovic Courtès 2015-08-27Add 'guix graph'....* guix/scripts/graph.scm, tests/graph.scm, tests/guix-graph.sh, doc/images/coreutils-bag-graph.dot, doc/images/coreutils-graph.dot: New files. * Makefile.am (MODULES): Add guix/scripts/graph.scm. (SH_TESTS): Add tests/guix-graph.sh. (SCM_TESTS): Add tests/graph.scm. * doc.am (DOT_FILES, DOT_VECTOR_GRAPHICS): New variables. (EXTRA_DIST): Use them. (dist_infoimage_DATA): Use $(DOT_FILES). (pdf-local, info-local, ps-local): Likewise. * doc/guix.texi (Packages with Multiple Outputs): Add cross-reference to 'guix graph'. (Invoking guix gc): Likewise. (Invoking guix graph): New section. Ludovic Courtès