本文整理汇总了Python中distutils.msvc9compiler.MSVCCompiler._remove_visual_c_ref方法的典型用法代码示例。如果您正苦于以下问题:Python MSVCCompiler._remove_visual_c_ref方法的具体用法?Python MSVCCompiler._remove_visual_c_ref怎么用?Python MSVCCompiler._remove_visual_c_ref使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类distutils.msvc9compiler.MSVCCompiler
的用法示例。
在下文中一共展示了MSVCCompiler._remove_visual_c_ref方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_remove_visual_c_ref
# 需要导入模块: from distutils.msvc9compiler import MSVCCompiler [as 别名]
# 或者: from distutils.msvc9compiler.MSVCCompiler import _remove_visual_c_ref [as 别名]
def test_remove_visual_c_ref(self):
from distutils.msvc9compiler import MSVCCompiler
tempdir = self.mkdtemp()
manifest = os.path.join(tempdir, 'manifest')
f = open(manifest, 'w')
try:
f.write(_MANIFEST_WITH_MULTIPLE_REFERENCES)
finally:
f.close()
compiler = MSVCCompiler()
compiler._remove_visual_c_ref(manifest)
f = open(manifest)
try:
content = '\n'.join([ line.rstrip() for line in f.readlines() ])
finally:
f.close()
self.assertEqual(content, _CLEANED_MANIFEST)
示例2: test_remove_visual_c_ref
# 需要导入模块: from distutils.msvc9compiler import MSVCCompiler [as 别名]
# 或者: from distutils.msvc9compiler.MSVCCompiler import _remove_visual_c_ref [as 别名]
def test_remove_visual_c_ref(self):
from distutils.msvc9compiler import MSVCCompiler
tempdir = self.mkdtemp()
manifest = os.path.join(tempdir, 'manifest')
f = open(manifest, 'w')
f.write(_MANIFEST)
f.close()
compiler = MSVCCompiler()
compiler._remove_visual_c_ref(manifest)
# see what we got
f = open(manifest)
# removing trailing spaces
content = '\n'.join([line.rstrip() for line in f.readlines()])
f.close()
# makes sure the manifest was properly cleaned
self.assertEquals(content, _CLEANED_MANIFEST)
示例3: test_remove_entire_manifest
# 需要导入模块: from distutils.msvc9compiler import MSVCCompiler [as 别名]
# 或者: from distutils.msvc9compiler.MSVCCompiler import _remove_visual_c_ref [as 别名]
def test_remove_entire_manifest(self):
from distutils.msvc9compiler import MSVCCompiler
tempdir = self.mkdtemp()
manifest = os.path.join(tempdir, 'manifest')
f = open(manifest, 'w')
try:
f.write(_MANIFEST_WITH_ONLY_MSVC_REFERENCE)
finally:
f.close()
compiler = MSVCCompiler()
got = compiler._remove_visual_c_ref(manifest)
self.assertIs(got, None)
示例4: test_remove_visual_c_ref
# 需要导入模块: from distutils.msvc9compiler import MSVCCompiler [as 别名]
# 或者: from distutils.msvc9compiler.MSVCCompiler import _remove_visual_c_ref [as 别名]
def test_remove_visual_c_ref(self):
from distutils.msvc9compiler import MSVCCompiler
tempdir = self.mkdtemp()
manifest = os.path.join(tempdir, "manifest")
f = open(manifest, "w")
try:
f.write(_MANIFEST_WITH_MULTIPLE_REFERENCES)
finally:
f.close()
compiler = MSVCCompiler()
compiler._remove_visual_c_ref(manifest)
# see what we got
f = open(manifest)
try:
# removing trailing spaces
content = "\n".join([line.rstrip() for line in f.readlines()])
finally:
f.close()
# makes sure the manifest was properly cleaned
self.assertEqual(content, _CLEANED_MANIFEST)