GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-84683: Check `<prefix>/share/zoneinfo` for zoneinfo files on Windo… · python/cpython@3000594

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Lib/sysconfig
    • __init__.py
  • Misc/NEWS.d/next/Library
    • 2021-09-21-17-17-29.gh-issue-84683.wDSRsG.rst
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Lib/sysconfig/__init__.py‎

Copy file name to clipboardExpand all lines: Lib/sysconfig/__init__.py
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,13 @@ def _init_non_posix(vars):
412412
vars['EXE'] = '.exe'
413413
vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT
414414
vars['BINDIR'] = os.path.dirname(_safe_realpath(sys.executable))
415-
vars['TZPATH'] = ''
415+
# No standard path exists on Windows for this, but we'll check
416+
# whether someone is imitating a POSIX-like layout
417+
check_tzpath = os.path.join(vars['prefix'], 'share', 'zoneinfo')
418+
if os.path.exists(check_tzpath):
419+
vars['TZPATH'] = check_tzpath
420+
else:
421+
vars['TZPATH'] = ''
416422

417423
#
418424
# public APIs
Collapse file

‎Misc/NEWS.d/next/Library/2021-09-21-17-17-29.gh-issue-84683.wDSRsG.rst‎

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
:mod:`zoneinfo`: Check in ``<prefix>/share/zoneinfo`` for data files on Windows

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.