/usr/lib/python3.9/site-packages/dateutil/zoneinfo/__pycache__
Edit: /usr/lib/python3.9/site-packages/dateutil/zoneinfo/__pycache__/rebuild.cpython-39.pyc (2637B)
a
&ÇiX ã @ sz d dl Z d dlZd dlZd dlZd dlZd dlmZmZ d dlm Z d dl
mZmZ ddg dfdd„Z
dd „ Zd
d„ ZdS )é N)Ú
check_callÚcheck_output)ÚTarFile)ÚMETADATA_FNÚZONEFILENAMEÚgzc sP t ¡ ‰ tj ˆ d¡}tj t¡}�zt | ¡�B}|D ]}| |ˆ ¡ q6‡ fdd„|D ƒ} t
|| ƒ W d ƒ n1 sx0 Y ttj |t¡dƒ�"}
tj
||
ddd� W d ƒ n1 s¾0 Y tj |t¡}t |d | ¡�:}t |¡D ]}tj ||¡}
| |
|¡ qòW d ƒ n1 �s(0 Y W t ˆ ¡ nt ˆ ¡ 0 dS )
z‹Rebuild the internal timezone info in dateutil/zoneinfo/zoneinfo*tar*
filename is the timezone tarball from ``ftp.iana.org/tz``.
Zzoneinfoc s g | ]}t j ˆ |¡‘qS © )ÚosÚpathÚjoin)Ú.0Ún©Ztmpdirr ú=/usr/lib/python3.9/site-packages/dateutil/zoneinfo/rebuild.pyÚ
ó zrebuild..NÚwé T)ÚindentZ sort_keyszw:%s)ÚtempfileZmkdtempr r
r ÚdirnameÚ__file__r ÚopenÚextractÚ_run_zicr ÚjsonÚdumpr ÚlistdirÚaddÚshutilÚrmtree)ÚfilenameÚtagÚformatZ
zonegroupsÚmetadataÚzonedirZ moduledirZtfÚnameÚ filepathsÚfÚtargetÚentryZ entrypathr r r Úrebuild s" (00r+ c
C st zt ddgƒ}W n. ty> } zt|ƒ ‚ W Y d}~n
d}~0 0 d|v rRddg}ng }tdg| d| g | ƒ dS )a½ Calls the ``zic`` compiler in a compatible way to get a "fat" binary.
Recent versions of ``zic`` default to ``-b slim``, while older versions
don't even have the ``-b`` option (but default to "fat" binaries). The
current version of dateutil does not support Version 2+ TZif files, which
causes problems when used in conjunction with "slim" binaries, so this
function is used to ensure that we always get a "fat" binary.
Zzicz--helpNs -b z-bZfatz-d)r ÚOSErrorÚ_print_on_nosuchfiler )r% r' Ú help_textÚeZ
bloat_argsr r r r ) s
r c C s | j dkrt d¡ dS )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- A s
ÿr- )r2 r r r r Ú
subprocessr r Útarfiler Zdateutil.zoneinfor r r+ r r- r r r r Ú s