def __init__(self):
# self.dist_linux = ['ubuntu', 'centos', 'redhat']
# self.dist_all = self.dist_linux + ['windows', 'macos']
self.dist_all = ['windows', 'linux', 'macos']
self.is_py2 = sys.version_info[0] == 2
self.is_py3 = sys.version_info[0] == 3
self.target = TARGET_RELEASE
self.target_path = 'release'
_py_ver = platform.python_version_tuple()
self.py_ver = '%s%s' % (_py_ver[0], _py_ver[1])
self.bits = BITS_32
self.bits_path = 'x86'
_bits = platform.architecture()[0]
if _bits == '64bit':
self.bits = BITS_64
self.bits_path = 'x64'
_os = platform.system().lower()
self.dist = ''
if _os == 'windows':
self.dist = 'windows'
elif _os == 'linux':
self.dist = 'linux'
# (dist, ver, sys_id) = platform.dist()
# dist = dist.lower()
# if dist in self.dist_linux:
# self.dist = dist
# else:
# raise RuntimeError('unsupported linux dist: %s' % dist)
elif _os == 'darwin':
self.dist = 'macos'
self.host_os = self.dist
if self.host_os == 'windows':
self.host_os_is_win_x64 = 'PROGRAMFILES(X86)' in os.environ
self.make_dist_path()
评论列表
文章目录