當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。