本文整理匯總了Python中distutils.cygwinccompiler方法的典型用法代碼示例。如果您正苦於以下問題:Python distutils.cygwinccompiler方法的具體用法?Python distutils.cygwinccompiler怎麽用?Python distutils.cygwinccompiler使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類distutils
的用法示例。
在下文中一共展示了distutils.cygwinccompiler方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_msvcr_replacement
# 需要導入模塊: import distutils [as 別名]
# 或者: from distutils import cygwinccompiler [as 別名]
def get_msvcr_replacement():
"""Replacement for outdated version of get_msvcr from cygwinccompiler"""
msvcr = msvc_runtime_library()
return [] if msvcr is None else [msvcr]
# monkey-patch cygwinccompiler with our updated version from misc_util
# to avoid getting an exception raised on Python 3.5
示例2: link
# 需要導入模塊: import distutils [as 別名]
# 或者: from distutils import cygwinccompiler [as 別名]
def link(self,
target_desc,
objects,
output_filename,
output_dir,
libraries,
library_dirs,
runtime_library_dirs,
export_symbols = None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None):
# Include the appropriate MSVC runtime library if Python was built
# with MSVC >= 7.0 (MinGW standard is msvcrt)
runtime_library = msvc_runtime_library()
if runtime_library:
if not libraries:
libraries = []
libraries.append(runtime_library)
args = (self,
target_desc,
objects,
output_filename,
output_dir,
libraries,
library_dirs,
runtime_library_dirs,
None, #export_symbols, we do this in our def-file
debug,
extra_preargs,
extra_postargs,
build_temp,
target_lang)
if self.gcc_version < "3.0.0":
func = distutils.cygwinccompiler.CygwinCCompiler.link
else:
func = UnixCCompiler.link
func(*args[:func.__code__.co_argcount])
return