mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
gh-84683: Check <prefix>/share/zoneinfo for zoneinfo files on Windows (GH-28495)
This commit is contained in:
parent
c653fba016
commit
3000594e92
2 changed files with 8 additions and 1 deletions
|
|
@ -412,7 +412,13 @@ def _init_non_posix(vars):
|
|||
vars['EXE'] = '.exe'
|
||||
vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT
|
||||
vars['BINDIR'] = os.path.dirname(_safe_realpath(sys.executable))
|
||||
vars['TZPATH'] = ''
|
||||
# No standard path exists on Windows for this, but we'll check
|
||||
# whether someone is imitating a POSIX-like layout
|
||||
check_tzpath = os.path.join(vars['prefix'], 'share', 'zoneinfo')
|
||||
if os.path.exists(check_tzpath):
|
||||
vars['TZPATH'] = check_tzpath
|
||||
else:
|
||||
vars['TZPATH'] = ''
|
||||
|
||||
#
|
||||
# public APIs
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
:mod:`zoneinfo`: Check in ``<prefix>/share/zoneinfo`` for data files on Windows
|
||||
Loading…
Add table
Add a link
Reference in a new issue