def architecture():
"""
Returns the bit depth of the python interpreter's architecture as
a string ('32bit' or '64bit'). Similar to platform.architecture(),
but with fixes for universal binaries on MacOS.
"""
if is_darwin:
# Darwin's platform.architecture() is buggy and always
# returns "64bit" event for the 32bit version of Python's
# universal binary. So we roll out our own (that works
# on Darwin).
if sys.maxsize > 2 ** 32:
return '64bit'
else:
return '32bit'
else:
return platform.architecture()[0]
评论列表
文章目录