+
    i  c                   sH    R t ^ RIt^ RItR	R ltR tR tR tR tR tR t	R# )
zShared AIX support functions.Nc                sr   ^ RI p^ RIp\        RVP                  4       : 2R4      pVP	                  V4      ;_uu_ 4       pV'       d   V : RVP
                  : R2pMV : RVP
                  : R2pVP                  V4      '       g   VP                  4       MRuuRRR4       #   + '       g   i     R# ; i)z0Output from successful command execution or NoneNz/tmp/_aix_support.zw+bz >'z' 2>&1z 2>/dev/null >'Z')os
contextlibZopenZgetpidZclosingZnameZsystemZread)ZcommandstringZcapture_stderrr    r   ZfpZcmds   &&    %/usr/lib64/python3.14/_aix_support.py_read_cmd_outputr      s    
 	
		
B 
		B		2%2BGG<C,9277CC "		#rwwyD 
 			s    AB%	B%%B6	c                 s    \         P                  R8X  d   ^ M^@pV^ 8w  d   TMRpRP                  V ^ ,          V ^,          V ^,          W24      # )i   '  zaix-{:1x}{:1d}{:02d}-{:04d}-{}i)sysZmaxsizeZformat)ZvrtlbdZ_sz_bds   &&  r   _aix_tagr      sF     ("bCa"TC+2247DGT!WcWW    c                 s    V P                  R 4      R,          w  rp\        VR,          4      \        V4      \        V4      .# )Z.:Ni   N)splitint)vrmfZvZrZtls   &   r   	_aix_vrtlr   $   s5    zz#r"HA""JAB((r	   c                 s6    ^ RI p V P                  . RO4      pVP	                  R4      pVP                  4       P                  R4      pVR,          R8w  d   \        VR,          4      MRp\        V^,          4      V3#   \         d    \        R4      p L~i ; i)	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
Nz/usr/bin/lslpp -Lqc bos.rtezutf-8Z:Z r   )z/usr/bin/lslppz-Lqczbos.rter
   )	
subprocessZcheck_outputZImportErrorr   ZdecodeZstripr   r   Zstr)r   Zoutr   s      r   _aix_bos_rter   *   s    >%%&KL **W
C
))+

C
 Cb'R-#c"g,TCAK  ><=>s   A? ?BBc                 sD    \        4       w  r\        \        V 4      V4      # )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
)r   r   r   )r   r   s     r   aix_platformr   ?   s    & ~HDIdOR((r	   c                  sl    \         P                  ! R 4      p V '       g   \        R4      h\        V R7      # )ZBUILD_GNU_TYPEzBUILD_GNU_TYPE is not defined)r   )	sysconfigget_config_var
ValueErrorr   )Zgnu_type    r   _aix_bgtr   W   s-    ''(89H899(##r	   c                 s    \         P                  ! R4      p  \        V 4      p \        \        4       T 4      #   \        \        3 d    \        RT : 24      hi ; i)z<
Return the platform_tag of the system Python was built on.
ZAIX_BUILDDATEz)AIX_BUILDDATE is not defined or invalid: )r   r   r   r   Z	TypeErrorr   r   )Z
build_dater   r   aix_buildtagr   _   sc     ))/:J,_
 HJ
++ 	" ,D&>+ , 	,,s	   7 !A)F)
Z__doc__r   r   r   r   r   r   r   r   r   ) r	   r   <module>r      s2    # 
 9$X)*)0$,r	   