ó
    F\hµ  ã                   óF   • S r SSKrSSKrS
S jrS rS rS rS rS rS	 r	g)zShared AIX support functions.é    Nc                 óV  • SSK nSSKn[        SUR                  5       < 3S5      nUR	                  U5       nU(       a  U < SUR
                  < S3nOU < SUR
                  < S3nUR                  U5      (       d  UR                  5       OSsSSS5        $ ! , (       d  f       g= f)	z0Output from successful command execution or Noner   Nz/tmp/_aix_support.zw+bz >'z' 2>&1z 2>/dev/null >'Ú')ÚosÚ
contextlibÚopenÚgetpidÚclosingÚnameÚsystemÚread)ÚcommandstringÚcapture_stderrr   r   ÚfpÚcmds         Ú#/usr/lib/python3.13/_aix_support.pyÚ_read_cmd_outputr      sy   € ó
 ÛÝ	Ø
�	‰	�ðØó
€Bð 
×	Ñ	˜BÔ	 2ÞÛ%2°B·G´GÐ<‰Cã,9¸2¿7¼7ÐCˆCØ "§	¡	¨#§¡ˆr�w‰wŒy°D÷ 
 ×	×	ús   ¸ABÂ
B(c                 ó€   • [         R                  S:X  a  SOSnUS:w  a  UOSnSR                  U S   U S   U S   X25      $ )	Niÿÿÿé    é@   r   é'  zaix-{:1x}{:1d}{:02d}-{:04d}-{}é   é   )ÚsysÚmaxsizeÚformat)ÚvrtlÚbdÚ_szÚ_bds       r   Ú_aix_tagr       sF   € ô —‘ Ó(‰"¨b€CØ�a“‰"˜T€Cà+×2Ñ2°4¸±7¸DÀ¹GÀTÈ!ÁWÈcÓWÐWó    c                 óv   • U R                  S5      S S u  pn[        US   5      [        U5      [        U5      /$ )NÚ.é   éÿÿÿÿ)ÚsplitÚint)ÚvrmfÚvÚrÚtls       r   Ú	_aix_vrtlr,   $   s7   € à�z‰z˜#‹˜r Ð"�H€Aˆ"Ü��"‘‹Jœ˜A›¤ B£Ð(Ð(r!   c                  ó  •  SSK n U R                  / SQ5      nUR	                  S5      nUR                  5       R                  S5      nUS   S:w  a  [        US   5      OS	n[        US
   5      U4$ ! [         a    [        S5      n Npf = f)a  
Return a Tuple[str, int] e.g., ['7.1.4.34', 1806]
The fileset bos.rte represents the current AIX run-time level. It's VRMF and
builddate reflect the current ABI levels of the runtime environment.
If no builddate is found give a value that will satisfy pep425 related queries
r   N)z/usr/bin/lslppz-Lqczbos.rtez/usr/bin/lslpp -Lqc bos.rtezutf-8Ú:r%   Ú r   r   )	Ú
subprocessÚcheck_outputÚImportErrorr   ÚdecodeÚstripr&   r'   Ústr)r0   Úoutr   s      r   Ú_aix_bos_rter7   *   s‰   € ð>ÛØ×%Ñ%Ò&KÓLˆð �*‰*�WÓ
€CØ
�)‰)‹+×
Ñ
˜CÓ
 €CØ˜b™' R›-Œ#ˆc�"‰gŒ,¨T€CÜ��A‘‹K˜ÐÐøô ó >ÜÐ<Ó=Šð>ús   ‚A2 Á2B
Â	B
c                  óD   • [        5       u  p[        [        U 5      U5      $ )ap  
AIX filesets are identified by four decimal values: V.R.M.F.
V (version) and R (release) can be retrieved using ``uname``
Since 2007, starting with AIX 5.3 TL7, the M value has been
included with the fileset bos.rte and represents the Technology
Level (TL) of AIX. The F (Fix) value also increases, but is not
relevant for comparing releases and binary compatibility.
For binary compatibility the so-called builddate is needed.
Again, the builddate of an AIX release is associated with bos.rte.
AIX ABI compatibility is described  as guaranteed at: https://www.ibm.com/    support/knowledgecenter/en/ssw_aix_72/install/binary_compatability.html

For pep425 purposes the AIX platform tag becomes:
"aix-{:1x}{:1d}{:02d}-{:04d}-{}".format(v, r, tl, builddate, bitsize)
e.g., "aix-6107-1415-32" for AIX 6.1 TL7 bd 1415, 32-bit
and, "aix-6107-1415-64" for AIX 6.1 TL7 bd 1415, 64-bit
)r7   r    r,   )r(   r   s     r   Úaix_platformr9   ?   s   € ô& ‹~�H€DÜ”I˜d“O RÓ(Ð(r!   c                  ód   • [         R                  " S5      n U (       d  [        S5      e[        U S9$ )NÚBUILD_GNU_TYPEzBUILD_GNU_TYPE is not defined)r(   )Ú	sysconfigÚget_config_varÚ
ValueErrorr,   )Úgnu_types    r   Ú_aix_bgtr@   W   s-   € ä×'Ò'Ð(8Ó9€HÞÜÐ8Ó9Ð9Ü˜(Ñ#Ð#r!   c                  ó´   • [         R                  " S5      n  [        U 5      n [        [        5       U 5      $ ! [        [        4 a    [        SU < 35      ef = f)z<
Return the platform_tag of the system Python was built on.
ÚAIX_BUILDDATEz)AIX_BUILDDATE is not defined or invalid: )r<   r=   r'   r>   Ú	TypeErrorr    r@   )Ú
build_dates    r   Úaix_buildtagrE   _   sc   € ô ×)Ò)¨/Ó:€Jð,Ü˜“_ˆ
ô ”H“J 
Ó+Ð+øô œ	Ð"ó ,ÜÐDØ&™>ð+ó ,ð 	,ð,ús	   ˜7 · A)F)
Ú__doc__r   r<   r   r    r,   r7   r9   r@   rE   © r!   r   Ú<module>rH      s2   ðÙ #ã 
Û ô9ò$Xò)òò*)ò0$ó,r!   