本文整理匯總了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")