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


Python config.config方法代码示例

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


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

示例1: test_clean

# 需要导入模块: from distutils.command import config [as 别名]
# 或者: from distutils.command.config import config [as 别名]
def test_clean(self):
        # _clean removes files
        tmp_dir = self.mkdtemp()
        f1 = os.path.join(tmp_dir, 'one')
        f2 = os.path.join(tmp_dir, 'two')

        self.write_file(f1, 'xxx')
        self.write_file(f2, 'xxx')

        for f in (f1, f2):
            self.assertTrue(os.path.exists(f))

        pkg_dir, dist = self.create_dist()
        cmd = config(dist)
        cmd._clean(f1, f2)

        for f in (f1, f2):
            self.assertFalse(os.path.exists(f)) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:20,代码来源:test_config_cmd.py

示例2: test_clean

# 需要导入模块: from distutils.command import config [as 别名]
# 或者: from distutils.command.config import config [as 别名]
def test_clean(self):
        # _clean removes files
        tmp_dir = self.mkdtemp()
        f1 = os.path.join(tmp_dir, 'one')
        f2 = os.path.join(tmp_dir, 'two')

        self.write_file(f1, 'xxx')
        self.write_file(f2, 'xxx')

        for f in (f1, f2):
            self.assertTrue(os.path.exists(f))

        pkg_dir, dist = self.create_dist()
        cmd = config(dist)
        cmd._clean(f1, f2)

        for f in (f1, f2):
            self.assertTrue(not os.path.exists(f)) 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:20,代码来源:test_config_cmd.py

示例3: test_search_cpp

# 需要导入模块: from distutils.command import config [as 别名]
# 或者: from distutils.command.config import config [as 别名]
def test_search_cpp(self):
        cmd = missing_compiler_executable(['preprocessor'])
        if cmd is not None:
            self.skipTest('The %r command is not found' % cmd)
        pkg_dir, dist = self.create_dist()
        cmd = config(dist)
        cmd._check_compiler()
        compiler = cmd.compiler
        if sys.platform[:3] == "aix" and "xlc" in compiler.preprocessor[0].lower():
            self.skipTest('xlc: The -E option overrides the -P, -o, and -qsyntaxonly options')

        # simple pattern searches
        match = cmd.search_cpp(pattern='xxx', body='/* xxx */')
        self.assertEqual(match, 0)

        match = cmd.search_cpp(pattern='_configtest', body='/* xxx */')
        self.assertEqual(match, 1) 
开发者ID:pypa,项目名称:setuptools,代码行数:19,代码来源:test_config_cmd.py

示例4: test_search_cpp

# 需要导入模块: from distutils.command import config [as 别名]
# 或者: from distutils.command.config import config [as 别名]
def test_search_cpp(self):
        pkg_dir, dist = self.create_dist()
        cmd = config(dist)

        # simple pattern searches
        match = cmd.search_cpp(pattern='xxx', body='/* xxx */')
        self.assertEqual(match, 0)

        match = cmd.search_cpp(pattern='_configtest', body='/* xxx */')
        self.assertEqual(match, 1) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:12,代码来源:test_config_cmd.py

示例5: test_finalize_options

# 需要导入模块: from distutils.command import config [as 别名]
# 或者: from distutils.command.config import config [as 别名]
def test_finalize_options(self):
        # finalize_options does a bit of transformation
        # on options
        pkg_dir, dist = self.create_dist()
        cmd = config(dist)
        cmd.include_dirs = 'one%stwo' % os.pathsep
        cmd.libraries = 'one'
        cmd.library_dirs = 'three%sfour' % os.pathsep
        cmd.ensure_finalized()

        self.assertEqual(cmd.include_dirs, ['one', 'two'])
        self.assertEqual(cmd.libraries, ['one'])
        self.assertEqual(cmd.library_dirs, ['three', 'four']) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:15,代码来源:test_config_cmd.py

示例6: test_search_cpp

# 需要导入模块: from distutils.command import config [as 别名]
# 或者: from distutils.command.config import config [as 别名]
def test_search_cpp(self):
        if sys.platform == 'win32':
            return
        pkg_dir, dist = self.create_dist()
        cmd = config(dist)

        # simple pattern searches
        match = cmd.search_cpp(pattern='xxx', body='// xxx')
        self.assertEqual(match, 0)

        match = cmd.search_cpp(pattern='_configtest', body='// xxx')
        self.assertEqual(match, 1) 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:14,代码来源:test_config_cmd.py

示例7: test_search_cpp

# 需要导入模块: from distutils.command import config [as 别名]
# 或者: from distutils.command.config import config [as 别名]
def test_search_cpp(self):
        cmd = missing_compiler_executable(['preprocessor'])
        if cmd is not None:
            self.skipTest('The %r command is not found' % cmd)
        pkg_dir, dist = self.create_dist()
        cmd = config(dist)

        # simple pattern searches
        match = cmd.search_cpp(pattern='xxx', body='/* xxx */')
        self.assertEqual(match, 0)

        match = cmd.search_cpp(pattern='_configtest', body='/* xxx */')
        self.assertEqual(match, 1) 
开发者ID:CedricGuillemet,项目名称:Imogen,代码行数:15,代码来源:test_config_cmd.py


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