+
     Bi                     H    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                r   ^ 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 >'')os
contextlibopengetpidclosingnamesystemread)commandstringcapture_stderrr   r   fpcmds   &&    #/usr/lib/python3.14/_aix_support.py_read_cmd_outputr      s    
 	
		
B 
		B		2%2BGG<C,9277CC "		#rwwyD 
 			s    AB%	B%%B6	c                     \         P                  R8X  d   ^ M^@pV^ 8w  d   TMRpRP                  V ^ ,          V ^,          V ^,          W24      # )   '  zaix-{:1x}{:1d}{:02d}-{:04d}-{}i)sysmaxsizeformat)vrtlbd_sz_bds   &&  r   _aix_tagr      sF     ("bCa"TC+2247DGT!WcWW    c                     V P                  R 4      R,          w  rp\        VR,          4      \        V4      \        V4      .# ).:N   N)splitint)vrmfvrtls   &   r   	_aix_vrtlr(   $   s5    zz#r"HA""JAB((r   c                 6    ^ 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-8: r   )z/usr/bin/lslppz-Lqczbos.rter!   )	
subprocesscheck_outputImportErrorr   decodestripr"   r#   str)r,   outr   s      r   _aix_bos_rter3   *   s    >%%&KL **W
C
))+

C
 Cb'R-#c"g,TCAK  ><=>s   A? ?BBc                 D    \        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
)r3   r   r(   )r$   r   s     r   aix_platformr5   ?   s    & ~HDIdOR((r   c                  l    \         P                  ! R 4      p V '       g   \        R4      h\        V R7      # )BUILD_GNU_TYPEzBUILD_GNU_TYPE is not defined)r$   )	sysconfigget_config_var
ValueErrorr(   )gnu_types    r   _aix_bgtr<   W   s-    ''(89H899(##r   c                     \         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.
AIX_BUILDDATEz)AIX_BUILDDATE is not defined or invalid: )r8   r9   r#   r:   	TypeErrorr   r<   )
build_dates    r   aix_buildtagrA   _   sc     ))/:J,_
 HJ
++ 	" ,D&>+ , 	,,s	   7 !A)F)
__doc__r   r8   r   r   r(   r3   r5   r<   rA    r   r   <module>rD      s2    # 
 9$X)*)0$,r   