from os import unamefrom distutils.version import LooseVersiondef check_all(*callables):def check(**kwargs):return all(c(**kwargs) for c in callables)return checkdef check_any(*callables):def check(**kwargs):return any(c(**kwargs) for c in callables)return checkdef is_platform(platform):def is_x(**kwargs):return uname()[0] == platformreturn is_xis_linux = is_platform('Linux')is_darwin = is_platform('Darwin')def is_arch(xarch):def is_x(arch, **kwargs):return arch.arch == xarchreturn is_xdef is_api_gt(apiver):def is_x(recipe, **kwargs):return recipe.ctx.android_api > apiverreturn is_xdef is_api_gte(apiver):def is_x(recipe, **kwargs):return recipe.ctx.android_api >= apiverreturn is_xdef is_api_lt(apiver):def is_x(recipe, **kwargs):return recipe.ctx.android_api < apiverreturn is_xdef is_api_lte(apiver):def is_x(recipe, **kwargs):return recipe.ctx.android_api <= apiverreturn is_xdef is_api(apiver):def is_x(recipe, **kwargs):return recipe.ctx.android_api == apiverreturn is_xdef will_build(recipe_name):def will(recipe, **kwargs):return recipe_name in recipe.ctx.recipe_build_orderreturn willdef is_ndk(ndk):def is_x(recipe, **kwargs):return recipe.ctx.ndk == ndkreturn is_xdef is_version_gt(version):def is_x(recipe, **kwargs):return LooseVersion(recipe.version) > versiondef is_version_lt(version):def is_x(recipe, **kwargs):return LooseVersion(recipe.version) < versionreturn is_xdef version_starts_with(version):def is_x(recipe, **kwargs):return recipe.version.startswith(version)return is_x
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。