def __init__(self):
""" Initialise the configuration. """
self.platform = sys.platform
self.version = sys.hexversion >> 8
self.inc_dir = sysconfig.get_python_inc()
self.venv_inc_dir = sysconfig.get_python_inc(prefix=sys.prefix)
self.module_dir = sysconfig.get_python_lib(plat_specific=1)
if sys.platform == 'win32':
self.bin_dir = sys.exec_prefix
self.data_dir = sys.prefix
self.lib_dir = sys.prefix + '\\libs'
else:
self.bin_dir = sys.exec_prefix + '/bin'
self.data_dir = sys.prefix + '/share'
self.lib_dir = sys.prefix + '/lib'
# The name of the interpreter used by the pyuic5 wrapper.
if sys.platform == 'darwin':
# The installation of MacOS's python is a mess that changes from
# version to version and where sys.executable is useless.
py_major = self.version >> 16
py_minor = (self.version >> 8) & 0xff
# In Python v3.4 and later there is no pythonw.
if (py_major == 3 and py_minor >= 4) or py_major >= 4:
exe = "python"
else:
exe = "pythonw"
self.pyuic_interpreter = '%s%d.%d' % (exe, py_major, py_minor)
else:
self.pyuic_interpreter = sys.executable
评论列表
文章目录