[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/06: gnu: python-django: Add a native search path for TZDIR.
From: |
guix-commits |
Subject: |
02/06: gnu: python-django: Add a native search path for TZDIR. |
Date: |
Thu, 20 Jan 2022 18:36:12 -0500 (EST) |
mbakke pushed a commit to branch master
in repository guix.
commit 3e10dcabc056852dba62064bd0471f431d828dc3
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Thu Jan 20 18:45:47 2022 +0100
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.
---
gnu/packages/django.scm | 12 +++++++++---
1 file 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))
- branch master updated (4c2df34c41 -> 7b62e4d3d3), guix-commits, 2022/01/20
- 03/06: gnu: ungoogled-chromium: Update to 97.0.4692.99., guix-commits, 2022/01/20
- 01/06: gnu: python-django-url-filter: Patch for Django 4.0 compatibility., guix-commits, 2022/01/20
- 02/06: gnu: python-django: Add a native search path for TZDIR.,
guix-commits <=
- 04/06: gnu: OpenLDAP: Add 2.6.1., guix-commits, 2022/01/20
- 06/06: gnu: python-django-auth-ldap: Update to 4.0.0., guix-commits, 2022/01/20
- 05/06: gnu: python-ldap: Update to 3.4.0., guix-commits, 2022/01/20