<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
3
6cY                 @   sf   d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZm	Z	m
Z
 ddg dfddZdd ZdS )	    N)
check_call)tar_openMETADATA_FNZONEFILENAMEZgzc          -      sH  t j  tjj d}tjjt}zt| v}x|D ]}|j|  q6W  fdd|D }	yt	dd|g|	  W n, t
k
r }
 zt|
  W Y dd}
~
X nX W dQ R X ttjj|td}tj||dd	d
 W dQ R X tjj|t}t|d| 6}x.tj|D ] }tjj||}|j|| qW W dQ R X W dtj  X dS )zRebuild the internal timezone info in dateutil/zoneinfo/zoneinfo*tar*

    filename is the timezone tarball from ftp.iana.org/tz.

    Zzoneinfoc                s   g | ]}t jj |qS  )ospathjoin).0n)tmpdirr   /usr/lib/python3.6/rebuild.py
<listcomp>   s    zrebuild.<locals>.<listcomp>Zzicz-dNw   T)indentZ	sort_keyszw:%s)tempfileZmkdtempr   r   r	   dirname__file__r   extractr   OSError_print_on_nosuchfileopenr   jsondumpr   listdiraddshutilZrmtree)filenametagformatZ
zonegroupsZmetadataZzonedirZ	moduledirZtfnameZ	filepathseftargetentryZ	entrypathr   )r   r   rebuild   s*    

 r&   c             C   s   | j dkrtjd dS )zdPrint helpful troubleshooting message

    e is an exception raised by subprocess.check_call()

       zzCould not find zic. Perhaps you need to install libc-bin or some other package that provides it, or it's not in your PATH?N)errnologgingerror)r"   r   r   r   r   *   s    
r   )r)   r   r   r   r   
subprocessr   Zdateutil.zoneinfor   r   r   r&   r   r   r   r   r   <module>   s   