def __init__(self):
_this_path = os.path.abspath(os.path.dirname(__file__))
self.root_path = os.path.abspath(os.path.join(_this_path, '..', '..', '..'))
self.build_path = os.path.abspath(os.path.join(_this_path, '..', '..'))
self.builder_path = os.path.join(self.build_path, 'builder')
self.win32_tools_path = os.path.join(self.build_path, 'tools', 'win32')
self.is_py2 = sys.version_info[0] == 2
self.is_py3 = sys.version_info[0] == 3
self.py_ver = platform.python_version_tuple()
self.py_ver_str = '%s%s' % (self.py_ver[0], self.py_ver[1])
self.py_exec = sys.executable
self.bits = self.BITS_32
self.bits_str = 'x86'
_bits = platform.architecture()[0]
if _bits == '64bit':
self.bits = self.BITS_64
self.bits_str = 'x64'
self.is_win = False
self.is_win_x64 = False
self.is_linux = False
self.is_macos = False
_os = platform.system().lower()
self.plat = ''
if _os == 'windows':
self.is_win = True
self.plat = 'windows'
self.is_win_x64 = 'PROGRAMFILES(X86)' in os.environ
elif _os == 'linux':
self.is_linux = True
self.plat = 'linux'
elif _os == 'darwin':
self.is_macos = True
self.plat = 'macos'
评论列表
文章目录