当前位置: 首页>>代码示例>>Python>>正文


Python CCompiler.__init__方法代码示例

本文整理汇总了Python中distutils.ccompiler.CCompiler.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python CCompiler.__init__方法的具体用法?Python CCompiler.__init__怎么用?Python CCompiler.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在distutils.ccompiler.CCompiler的用法示例。


在下文中一共展示了CCompiler.__init__方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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.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']
     return
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:31,代码来源:bcppcompiler.py

示例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)
     self.__version = get_build_version()
     if self.__version >= 7:
         self.__root = r"Software\Microsoft\VisualStudio"
         self.__macros = MacroExpander(self.__version)
     else:
         self.__root = r"Software\Microsoft\Devstudio"
     self.initialized = False
开发者ID:bushuhui,项目名称:pyKanjiDict,代码行数:11,代码来源:msvccompiler.py

示例3: __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 = VERSION
     self.__root = 'Software\\Microsoft\\VisualStudio'
     self.__paths = []
     self.plat_name = None
     self.__arch = None
     self.initialized = False
     return
开发者ID:webiumsk,项目名称:WOT-0.9.12-CT,代码行数:11,代码来源:msvc9compiler.py

示例4: __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.__paths = []
     self.__arch = None  # deprecated name
     if os.name == 'nt':
         if isinstance(self, distutils.msvc9compiler.MSVCCompiler):
             self.__version = distutils.msvc9compiler.VERSION
     self.initialized = False
     self.preprocess_options = None
开发者ID:sanfx,项目名称:Cellar,代码行数:11,代码来源:msvccompiler.py

示例5: __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 = VERSION
     self.__root = r"Software\Microsoft\VisualStudio"
     # self.__macros = MACROS
     self.__paths = []
     # target platform (.plat_name is consistent with 'bdist')
     self.plat_name = None
     self.__arch = None # deprecated name
     self.initialized = False
开发者ID:AtomicConductor,项目名称:conductor_client,代码行数:12,代码来源:msvc9compiler.py

示例6: __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":
         if self.__version >= 7:
             self.__root = "Software\\Microsoft\\VisualStudio"
             self.__macros = MacroExpander(self.__version)
         else:
             self.__root = "Software\\Microsoft\\Devstudio"
         self.__product = "Visual Studio version %s" % self.__version
     else:
         self.__product = "Microsoft SDK compiler %s" % (self.__version + 6)
     self.initialized = False
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:16,代码来源:msvccompiler.py

示例7: __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()
        if self.__version >= 7:
            self.__root = r"Software\Microsoft\VisualStudio"
            self.__macros = MacroExpander(self.__version)
        else:
            self.__root = r"Software\Microsoft\Devstudio"
        self.__paths = self.get_msvc_paths("path")

        if len (self.__paths) == 0:
            raise DistutilsPlatformError, \
                  ("Python was built with version %s of Visual Studio, "
                   "and extensions need to be built with the same "
                   "version of the compiler, but it isn't installed." % self.__version)

        self.cc = self.find_exe("cl.exe")
        self.linker = self.find_exe("link.exe")
        self.lib = self.find_exe("lib.exe")
        self.rc = self.find_exe("rc.exe")   # resource compiler
        self.mc = self.find_exe("mc.exe")   # message compiler
        self.set_path_env_var('lib')
        self.set_path_env_var('include')

        # extend the MSVC path with the current path
        try:
            for p in string.split(os.environ['path'], ';'):
                self.__paths.append(p)
        except KeyError:
            pass
        os.environ['path'] = string.join(self.__paths, ';')

        self.preprocess_options = None
        self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GX' ,
                                 '/DNDEBUG']
        self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GX',
                                      '/Z7', '/D_DEBUG']

        self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO']
        self.ldflags_shared_debug = [
            '/DLL', '/nologo', '/INCREMENTAL:no', '/pdb:None', '/DEBUG'
            ]
        self.ldflags_static = [ '/nologo']
开发者ID:B-Rich,项目名称:breve,代码行数:45,代码来源:msvccompiler.py

示例8: __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"]
开发者ID:Rogerlin2013,项目名称:CrossApp,代码行数:23,代码来源:bcppcompiler.py

示例9: __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)
        versions = get_devstudio_versions()

        if versions:
            version = versions[0]  # highest version

            self.cc = find_exe("cl.exe", version)
            self.linker = find_exe("link.exe", version)
            self.lib = find_exe("lib.exe", version)
            self.rc = find_exe("rc.exe", version)  # resource compiler
            self.mc = find_exe("mc.exe", version)  # message compiler
            set_path_env_var("lib", version)
            set_path_env_var("include", version)
            path = get_msvc_paths("path", version)
            try:
                for p in string.split(os.environ["path"], ";"):
                    path.append(p)
            except KeyError:
                pass
            os.environ["path"] = string.join(path, ";")
        else:
            # devstudio not found in the registry
            self.cc = "cl.exe"
            self.linker = "link.exe"
            self.lib = "lib.exe"
            self.rc = "rc.exe"
            self.mc = "mc.exe"

        self.preprocess_options = None
        self.compile_options = ["/nologo", "/Ox", "/MD", "/W3", "/GX"]
        self.compile_options_debug = ["/nologo", "/Od", "/MDd", "/W3", "/GX", "/Z7", "/D_DEBUG"]

        self.ldflags_shared = ["/DLL", "/nologo", "/INCREMENTAL:NO"]
        self.ldflags_shared_debug = ["/DLL", "/nologo", "/INCREMENTAL:no", "/pdb:None", "/DEBUG"]
        self.ldflags_static = ["/nologo"]
开发者ID:mcyril,项目名称:ravel-ftn,代码行数:39,代码来源:msvccompiler.py

示例10: __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)
开发者ID:bushuhui,项目名称:pyKanjiDict,代码行数:8,代码来源:mwerkscompiler.py

示例11: __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)
     # target platform (.plat_name is consistent with 'bdist')
     self.plat_name = None
     self.initialized = False
开发者ID:ARK4579,项目名称:cpython,代码行数:7,代码来源:_msvccompiler.py

示例12:

# 需要导入模块: from distutils.ccompiler import CCompiler [as 别名]
# 或者: from distutils.ccompiler.CCompiler import __init__ [as 别名]
"""distutils.bcppcompiler
开发者ID:mcyril,项目名称:ravel-ftn,代码行数:3,代码来源:bcppcompiler.py

示例13:

# 需要导入模块: from distutils.ccompiler import CCompiler [as 别名]
# 或者: from distutils.ccompiler.CCompiler import __init__ [as 别名]
"""distutils.unixccompiler
开发者ID:mcyril,项目名称:ravel-ftn,代码行数:3,代码来源:unixccompiler.py

示例14:

# 需要导入模块: from distutils.ccompiler import CCompiler [as 别名]
# 或者: from distutils.ccompiler.CCompiler import __init__ [as 别名]
"""distutils.mwerkscompiler
开发者ID:mcyril,项目名称:ravel-ftn,代码行数:3,代码来源:mwerkscompiler.py


注:本文中的distutils.ccompiler.CCompiler.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。