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


Python msvccompiler.get_build_version方法代码示例

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


在下文中一共展示了msvccompiler.get_build_version方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: generate_manifest

# 需要导入模块: from distutils import msvccompiler [as 别名]
# 或者: from distutils.msvccompiler import get_build_version [as 别名]
def generate_manifest(config):
    msver = get_build_msvc_version()
    if msver is not None:
        if msver >= 8:
            check_embedded_msvcr_match_linked(msver)
            ma = int(msver)
            mi = int((msver - ma) * 10)
            # Write the manifest file
            manxml = msvc_manifest_xml(ma, mi)
            man = open(manifest_name(config), "w")
            config.temp_files.append(manifest_name(config))
            man.write(manxml)
            man.close()
            # # Write the rc file
            # manrc = manifest_rc(manifest_name(self), "exe")
            # rc = open(rc_name(self), "w")
            # self.temp_files.append(manrc)
            # rc.write(manrc)
            # rc.close() 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:21,代码来源:mingw32ccompiler.py

示例2: generate_manifest

# 需要导入模块: from distutils import msvccompiler [as 别名]
# 或者: from distutils.msvccompiler import get_build_version [as 别名]
def generate_manifest(config):
    msver = get_build_msvc_version()
    if msver is not None:
        if msver >= 8:
            check_embedded_msvcr_match_linked(msver)
            ma = int(msver)
            mi = int((msver - ma) * 10)
            # Write the manifest file
            manxml = msvc_manifest_xml(ma, mi)
            man = open(manifest_name(config), "w")
            config.temp_files.append(manifest_name(config))
            man.write(manxml)
            man.close() 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:15,代码来源:mingw32ccompiler.py

示例3: needs_mingw_ftime_workaround

# 需要导入模块: from distutils import msvccompiler [as 别名]
# 或者: from distutils.msvccompiler import get_build_version [as 别名]
def needs_mingw_ftime_workaround():
    # We need the mingw workaround for _ftime if the msvc runtime version is
    # 7.1 or above and we build with mingw ...
    # ... but we can't easily detect compiler version outside distutils command
    # context, so we will need to detect in randomkit whether we build with gcc
    msver = get_msvc_build_version()
    if msver and msver >= 8:
        return True

    return False 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:12,代码来源:setup.py

示例4: get_exe_bytes

# 需要导入模块: from distutils import msvccompiler [as 别名]
# 或者: from distutils.msvccompiler import get_build_version [as 别名]
def get_exe_bytes (self):
        from distutils.msvccompiler import get_build_version
        # If a target-version other than the current version has been
        # specified, then using the MSVC version from *this* build is no good.
        # Without actually finding and executing the target version and parsing
        # its sys.version, we just hard-code our knowledge of old versions.
        # NOTE: Possible alternative is to allow "--target-version" to
        # specify a Python executable rather than a simple version string.
        # We can then execute this program to obtain any info we need, such
        # as the real sys.version string for the build.
        cur_version = get_python_version()
        if self.target_version and self.target_version != cur_version:
            if self.target_version < "2.3":
                raise NotImplementedError
            elif self.target_version == "2.3":
               bv = "6"
            elif self.target_version in ("2.4", "2.5"):
               bv = "7.1"
            elif self.target_version in ("2.6", "2.7"):
                bv = "9.0"
            else:
                raise NotImplementedError
        else:
            # for current version - use authoritative check.
            bv = get_build_version()

        # wininst-x.y.exe is in the same directory as this file
        directory = os.path.dirname(__file__)
        # we must use a wininst-x.y.exe built with the same C compiler
        # used for python.  XXX What about mingw, borland, and so on?

        # The uninstallers need to be available in $PYEXT_CROSS/uninst/*.exe
        # Use http://oss.itsystementwicklung.de/hg/pyext_cross_linux_to_win32/
        # and copy it alongside your pysqlite checkout.

        filename = os.path.join(directory, os.path.join(os.environ["PYEXT_CROSS"], "uninst", "wininst-%s.exe" % bv))
        return open(filename, "rb").read()
# class bdist_wininst 
开发者ID:plasticityai,项目名称:magnitude,代码行数:40,代码来源:cross_bdist_wininst.py

示例5: get_exe_bytes

# 需要导入模块: from distutils import msvccompiler [as 别名]
# 或者: from distutils.msvccompiler import get_build_version [as 别名]
def get_exe_bytes (self):
        from distutils.msvccompiler import get_build_version
        # If a target-version other than the current version has been
        # specified, then using the MSVC version from *this* build is no good.
        # Without actually finding and executing the target version and parsing
        # its sys.version, we just hard-code our knowledge of old versions.
        # NOTE: Possible alternative is to allow "--target-version" to
        # specify a Python executable rather than a simple version string.
        # We can then execute this program to obtain any info we need, such
        # as the real sys.version string for the build.
        cur_version = get_python_version()
        if self.target_version and self.target_version != cur_version:
            # If the target version is *later* than us, then we assume they
            # use what we use
            # string compares seem wrong, but are what sysconfig.py itself uses
            if self.target_version > cur_version:
                bv = get_build_version()
            else:
                if self.target_version < "2.4":
                    bv = "6"
                else:
                    bv = "7.1"
        else:
            # for current version - use authoritative check.
            bv = get_build_version()

        # wininst-x.y.exe is in the same directory as this file
        directory = os.path.dirname(__file__)
        # we must use a wininst-x.y.exe built with the same C compiler
        # used for python.  XXX What about mingw, borland, and so on?
        filename = os.path.join(directory, "wininst-%s.exe" % bv)
        return open(filename, "rb").read()
# class bdist_wininst 
开发者ID:ofermend,项目名称:medicare-demo,代码行数:35,代码来源:bdist_wininst.py


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