本文整理汇总了Python中setuptools.run_2to3_on_doctests方法的典型用法代码示例。如果您正苦于以下问题:Python setuptools.run_2to3_on_doctests方法的具体用法?Python setuptools.run_2to3_on_doctests怎么用?Python setuptools.run_2to3_on_doctests使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类setuptools
的用法示例。
在下文中一共展示了setuptools.run_2to3_on_doctests方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run_2to3
# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import run_2to3_on_doctests [as 别名]
def run_2to3(self, files, doctests = False):
# See of the distribution option has been set, otherwise check the
# setuptools default.
if self.distribution.use_2to3 is not True:
return
if not files:
return
log.info("Fixing "+" ".join(files))
self.__build_fixer_names()
self.__exclude_fixers()
if doctests:
if setuptools.run_2to3_on_doctests:
r = DistutilsRefactoringTool(self.fixer_names)
r.refactor(files, write=True, doctests_only=True)
else:
_Mixin2to3.run_2to3(self, files)
示例2: run_2to3
# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import run_2to3_on_doctests [as 别名]
def run_2to3(self, files, doctests=False):
# See of the distribution option has been set, otherwise check the
# setuptools default.
if self.distribution.use_2to3 is not True:
return
if not files:
return
log.info("Fixing " + " ".join(files))
self.__build_fixer_names()
self.__exclude_fixers()
if doctests:
if setuptools.run_2to3_on_doctests:
r = DistutilsRefactoringTool(self.fixer_names)
r.refactor(files, write=True, doctests_only=True)
else:
_Mixin2to3.run_2to3(self, files)
示例3: run_2to3
# 需要导入模块: import setuptools [as 别名]
# 或者: from setuptools import run_2to3_on_doctests [as 别名]
def run_2to3(self, files, doctests=False):
# See of the distribution option has been set, otherwise check the
# setuptools default.
if self.distribution.use_2to3 is not True:
return
if not files:
return
warnings.warn(
"2to3 support is deprecated. If the project still "
"requires Python 2 support, please migrate to "
"a single-codebase solution or employ an "
"independent conversion process.",
SetuptoolsDeprecationWarning)
log.info("Fixing " + " ".join(files))
self.__build_fixer_names()
self.__exclude_fixers()
if doctests:
if setuptools.run_2to3_on_doctests:
r = DistutilsRefactoringTool(self.fixer_names)
r.refactor(files, write=True, doctests_only=True)
else:
_Mixin2to3.run_2to3(self, files)