@@ -15,8 +15,9 @@ def _aix_tag(vrtl, bd):
15
15
# type: (List[int], int) -> str
16
16
# Infer the ABI bitwidth from maxsize (assuming 64 bit as the default)
17
17
_sz = 32 if sys .maxsize == (2 ** 31 - 1 ) else 64
18
+ _bd = bd if bd != 0 else 9988
18
19
# 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 )
20
21
21
22
22
23
# extract version, release and technology level from a VRMF string
@@ -26,19 +27,20 @@ def _aix_vrtl(vrmf):
26
27
return [int (v [- 1 ]), int (r ), int (tl )]
27
28
28
29
29
- def _aix_bosmp64 ():
30
+ def _aix_bos_rte ():
30
31
# type: () -> Tuple[str, int]
31
32
"""
32
33
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
35
37
"""
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 " ])
38
40
out = out .decode ("utf-8" )
39
41
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 )
42
44
43
45
44
46
def aix_platform ():
@@ -47,11 +49,11 @@ def aix_platform():
47
49
AIX filesets are identified by four decimal values: V.R.M.F.
48
50
V (version) and R (release) can be retreived using ``uname``
49
51
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
51
53
Level (TL) of AIX. The F (Fix) value also increases, but is not
52
54
relevant for comparing releases and binary compatibility.
53
55
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 .
55
57
AIX ABI compatibility is described as guaranteed at: https://www.ibm.com/\
56
58
support/knowledgecenter/en/ssw_aix_72/install/binary_compatability.html
57
59
@@ -60,7 +62,7 @@ def aix_platform():
60
62
e.g., "aix-6107-1415-32" for AIX 6.1 TL7 bd 1415, 32-bit
61
63
and, "aix-6107-1415-64" for AIX 6.1 TL7 bd 1415, 64-bit
62
64
"""
63
- vrmf , bd = _aix_bosmp64 ()
65
+ vrmf , bd = _aix_bos_rte ()
64
66
return _aix_tag (_aix_vrtl (vrmf ), bd )
65
67
66
68
@@ -79,7 +81,7 @@ def aix_buildtag():
79
81
Return the platform_tag of the system Python was built on.
80
82
"""
81
83
# 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 }'
83
85
build_date = sysconfig .get_config_var ("AIX_BUILDDATE" )
84
86
try :
85
87
build_date = int (build_date )
0 commit comments