本文整理汇总了Python中distutils.ccompiler.CCompiler.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python CCompiler.__init__方法的具体用法?Python CCompiler.__init__怎么用?Python CCompiler.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类distutils.ccompiler.CCompiler
的用法示例。
在下文中一共展示了CCompiler.__init__方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from distutils.ccompiler import CCompiler [as 别名]
# 或者: from distutils.ccompiler.CCompiler import __init__ [as 别名]
def __init__ (self, verbose=0, dry_run=0, force=0):
CCompiler.__init__ (self, verbose, dry_run, force)
self.__version = get_build_version()
self.__arch = get_build_architecture()
if self.__arch == "Intel":
# x86
if self.__version >= 7:
self.__root = r"Software\Microsoft\VisualStudio"
self.__macros = MacroExpander(self.__version)
else:
self.__root = r"Software\Microsoft\Devstudio"
self.__product = "Visual Studio version %s" % self.__version
else:
# Win64. Assume this was built with the platform SDK
self.__product = "Microsoft SDK compiler %s" % (self.__version + 6)
self.initialized = False
示例2: __init__
# 需要导入模块: from distutils.ccompiler import CCompiler [as 别名]
# 或者: from distutils.ccompiler.CCompiler import __init__ [as 别名]
def __init__ (self,
verbose=0,
dry_run=0,
force=0):
CCompiler.__init__ (self, verbose, dry_run, force)
# These executables are assumed to all be in the path.
# Borland doesn't seem to use any special registry settings to
# indicate their installation locations.
self.cc = "bcc32.exe"
self.linker = "ilink32.exe"
self.lib = "tlib.exe"
self.preprocess_options = None
self.compile_options = ['/tWM', '/O2', '/q', '/g0']
self.compile_options_debug = ['/tWM', '/Od', '/q', '/g0']
self.ldflags_shared = ['/Tpd', '/Gn', '/q', '/x']
self.ldflags_shared_debug = ['/Tpd', '/Gn', '/q', '/x']
self.ldflags_static = []
self.ldflags_exe = ['/Gn', '/q', '/x']
self.ldflags_exe_debug = ['/Gn', '/q', '/x','/r']
# -- Worker methods ------------------------------------------------
示例3: __init__
# 需要导入模块: from distutils.ccompiler import CCompiler [as 别名]
# 或者: from distutils.ccompiler.CCompiler import __init__ [as 别名]
def __init__(self, version):
self.macros = {}
self.vsbase = VS_BASE % version
self.load_macros(version)