本文整理汇总了Python中SCons.Action.Action方法的典型用法代码示例。如果您正苦于以下问题:Python Action.Action方法的具体用法?Python Action.Action怎么用?Python Action.Action使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SCons.Action
的用法示例。
在下文中一共展示了Action.Action方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate
# 需要导入模块: from SCons import Action [as 别名]
# 或者: from SCons.Action import Action [as 别名]
def generate(env):
env.SetDefault(gettext_package_bugs_address="[email protected]")
env.SetDefault(gettext_package_name="")
env.SetDefault(gettext_package_version="")
env['BUILDERS']['gettextMoFile']=env.Builder(
action=Action("msgfmt -o $TARGET $SOURCE", "Compiling translation $SOURCE"),
suffix=".mo",
src_suffix=".po"
)
env['BUILDERS']['gettextPotFile']=env.Builder(
action=Action("xgettext " + XGETTEXT_COMMON_ARGS, "Generating pot file $TARGET"),
suffix=".pot")
env['BUILDERS']['gettextMergePotFile']=env.Builder(
action=Action("xgettext " + "--omit-header --no-location " + XGETTEXT_COMMON_ARGS,
"Generating pot file $TARGET"),
suffix=".pot")
示例2: generate
# 需要导入模块: from SCons import Action [as 别名]
# 或者: from SCons.Action import Action [as 别名]
def generate(env):
env.SetDefault(gettext_package_bugs_address="e[email protected]")
env.SetDefault(gettext_package_name="")
env.SetDefault(gettext_package_version="")
env['BUILDERS']['gettextMoFile']=env.Builder(
action=Action("msgfmt -o $TARGET $SOURCE", "Compiling translation $SOURCE"),
suffix=".mo",
src_suffix=".po"
)
env['BUILDERS']['gettextPotFile']=env.Builder(
action=Action("xgettext " + XGETTEXT_COMMON_ARGS, "Generating pot file $TARGET"),
suffix=".pot")
env['BUILDERS']['gettextMergePotFile']=env.Builder(
action=Action("xgettext " + "--omit-header --no-location " + XGETTEXT_COMMON_ARGS,
"Generating pot file $TARGET"),
suffix=".pot")