@@ -15,8 +15,9 @@ def _aix_tag(vrtl, bd):
1515 # type: (List[int], int) -> str
1616 # Infer the ABI bitwidth from maxsize (assuming 64 bit as the default)
1717 _sz = 32 if sys .maxsize == (2 ** 31 - 1 ) else 64
18+ _bd = bd if bd != 0 else 9988
1819 # vrtl[version, release, technology_level]
19- return "aix-{:1x}{:1d}{:02d}-{:04d}-{}" .format (vrtl [0 ], vrtl [1 ], vrtl [2 ], bd , _sz )
20+ return "aix-{:1x}{:1d}{:02d}-{:04d}-{}" .format (vrtl [0 ], vrtl [1 ], vrtl [2 ], _bd , _sz )
2021
2122
2223# extract version, release and technology level from a VRMF string
@@ -26,19 +27,20 @@ def _aix_vrtl(vrmf):
2627 return [int (v [- 1 ]), int (r ), int (tl )]
2728
2829
29- def _aix_bosmp64 ():
30+ def _aix_bos_rte ():
3031 # type: () -> Tuple[str, int]
3132 """
3233 Return a Tuple[str, int] e.g., ['7.1.4.34', 1806]
33- The fileset bos.mp64 is the AIX kernel. It's VRMF and builddate
34- reflect the current ABI levels of the runtime environment.
34+ The fileset bos.rte represents the current AIX run-time level. It's VRMF and
35+ builddate reflect the current ABI levels of the runtime environment.
36+ If no builddate is found give a value that will satisfy pep425 related queries
3537 """
36- # We expect all AIX systems to have lslpp installed in this location
37- out = subprocess .check_output (["/usr/bin/lslpp" , "-Lqc" , "bos.mp64 " ])
38+ # All AIX systems to have lslpp installed in this location
39+ out = subprocess .check_output (["/usr/bin/lslpp" , "-Lqc" , "bos.rte " ])
3840 out = out .decode ("utf-8" )
3941 out = out .strip ().split (":" ) # type: ignore
40- # Use str() and int() to help mypy see types
41- return (str (out [2 ]), int ( out [ - 1 ]) )
42+ _bd = int (out [ - 1 ]) if out [ - 1 ] != '' else 9988
43+ return (str (out [2 ]), _bd )
4244
4345
4446def aix_platform ():
@@ -47,11 +49,11 @@ def aix_platform():
4749 AIX filesets are identified by four decimal values: V.R.M.F.
4850 V (version) and R (release) can be retreived using ``uname``
4951 Since 2007, starting with AIX 5.3 TL7, the M value has been
50- included with the fileset bos.mp64 and represents the Technology
52+ included with the fileset bos.rte and represents the Technology
5153 Level (TL) of AIX. The F (Fix) value also increases, but is not
5254 relevant for comparing releases and binary compatibility.
5355 For binary compatibility the so-called builddate is needed.
54- Again, the builddate of an AIX release is associated with bos.mp64 .
56+ Again, the builddate of an AIX release is associated with bos.rte .
5557 AIX ABI compatibility is described as guaranteed at: https://www.ibm.com/\
5658 support/knowledgecenter/en/ssw_aix_72/install/binary_compatability.html
5759
@@ -60,7 +62,7 @@ def aix_platform():
6062 e.g., "aix-6107-1415-32" for AIX 6.1 TL7 bd 1415, 32-bit
6163 and, "aix-6107-1415-64" for AIX 6.1 TL7 bd 1415, 64-bit
6264 """
63- vrmf , bd = _aix_bosmp64 ()
65+ vrmf , bd = _aix_bos_rte ()
6466 return _aix_tag (_aix_vrtl (vrmf ), bd )
6567
6668
@@ -79,7 +81,7 @@ def aix_buildtag():
7981 Return the platform_tag of the system Python was built on.
8082 """
8183 # AIX_BUILDDATE is defined by configure with:
82- # lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }'
84+ # lslpp -Lcq bos.rte | awk -F: '{ print $NF }'
8385 build_date = sysconfig .get_config_var ("AIX_BUILDDATE" )
8486 try :
8587 build_date = int (build_date )
0 commit comments