mirror of
https://github.com/python/cpython.git
synced 2025-08-21 09:21:18 +00:00
Backport of revision 62854
This commit is contained in:
parent
fbc190af4f
commit
c0c3914b09
1 changed files with 11 additions and 1 deletions
|
@ -591,6 +591,16 @@ def mac_ver(release='',versioninfo=('','',''),machine=''):
|
||||||
major = (sysv & 0xFF00) >> 8
|
major = (sysv & 0xFF00) >> 8
|
||||||
minor = (sysv & 0x00F0) >> 4
|
minor = (sysv & 0x00F0) >> 4
|
||||||
patch = (sysv & 0x000F)
|
patch = (sysv & 0x000F)
|
||||||
|
|
||||||
|
if (major, minor) >= (10, 4):
|
||||||
|
# the 'sysv' gestald cannot return patchlevels
|
||||||
|
# higher than 9. Apple introduced 3 new
|
||||||
|
# gestalt codes in 10.4 to deal with this
|
||||||
|
# issue (needed because patch levels can
|
||||||
|
# run higher than 9, such as 10.4.11)
|
||||||
|
major,minor,patch = _mac_ver_lookup(('sys1','sys2','sys3'))
|
||||||
|
release = '%i.%i.%i' %(major, minor, patch)
|
||||||
|
else:
|
||||||
release = '%s.%i.%i' % (_bcd2str(major),minor,patch)
|
release = '%s.%i.%i' % (_bcd2str(major),minor,patch)
|
||||||
if sysu:
|
if sysu:
|
||||||
major = int((sysu & 0xFF000000L) >> 24)
|
major = int((sysu & 0xFF000000L) >> 24)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue