• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python utils.assert_can_execute函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pybuilder.utils.assert_can_execute函数的典型用法代码示例。如果您正苦于以下问题:Python assert_can_execute函数的具体用法?Python assert_can_execute怎么用?Python assert_can_execute使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了assert_can_execute函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: assert_frosted_is_executable

def assert_frosted_is_executable(logger):
    """ Asserts that the frosted script is executable. """
    logger.debug("Checking if frosted is executable.")

    assert_can_execute(
        command_and_arguments=["frosted", "--version"], prerequisite="frosted (PyPI)", caller="plugin python.frosted"
    )
开发者ID:shakamunyi,项目名称:pybuilder,代码行数:7,代码来源:frosted_plugin.py


示例2: assert_cram_is_executable

def assert_cram_is_executable(logger):
    """ Asserts that the cram script is executable. """
    logger.debug("Checking if cram is executable.")

    assert_can_execute(command_and_arguments=["cram", "--version"],
                       prerequisite="cram",
                       caller="plugin python.cram")
开发者ID:arcivanov,项目名称:pybuilder,代码行数:7,代码来源:cram_plugin.py


示例3: assert_py2dsc_deb_is_available

def assert_py2dsc_deb_is_available(logger):
    """Asserts that the py2dsc-deb is available.
    """
    logger.debug("Checking if py2dsc-deb is available.")

    assert_can_execute(
        ["py2dsc-deb", "-h"], "py2dsc-deb", "plugin python.stdeb")
开发者ID:Dotty280983,项目名称:pybuilder,代码行数:7,代码来源:stdeb_plugin.py


示例4: set_description

def set_description(project, logger):
    if project.get_property("distutils_readme_description"):
        try:
            assert_can_execute(["pandoc", "--version"], "pandoc", "distutils")
            doc_convert(project, logger)
        except (MissingPrerequisiteException, ImportError):
            logger.warn("Was unable to find pandoc or pypandoc and did not convert the documentation")
开发者ID:esc,项目名称:pybuilder,代码行数:7,代码来源:distutils_plugin.py


示例5: assert_sphinx_quickstart_is_available

def assert_sphinx_quickstart_is_available(logger):
    """Asserts that the sphinx-quickstart script is available.
    """
    logger.debug("Checking if sphinx-quickstart is available.")

    assert_can_execute(
        ["sphinx-quickstart", "--version"], "sphinx", "plugin python.sphinx")
开发者ID:wenlien,项目名称:pybuilder,代码行数:7,代码来源:sphinx_plugin.py


示例6: assert_flake8_is_executable

def assert_flake8_is_executable(logger):
    """ Asserts that the flake8 script is executable. """
    logger.debug("Checking if flake8 is executable.")

    assert_can_execute(command_and_arguments=["flake8", "--version"],
                       prerequisite="flake8",
                       caller="plugin python.flake8")
开发者ID:arcivanov,项目名称:pybuilder,代码行数:7,代码来源:flake8_plugin.py


示例7: assert_dpkg_is_available

def assert_dpkg_is_available(logger):
    """Asserts that the dpkg-buildpackage is available.
    """
    logger.debug("Checking if dpkg-buildpackage is available")

    assert_can_execute(
        ["dpkg-buildpackage", "--help"], "dpkg-buildpackage", "plugin python.stdeb")
开发者ID:Dotty280983,项目名称:pybuilder,代码行数:7,代码来源:stdeb_plugin.py


示例8: assert_sphinx_is_available

def assert_sphinx_is_available(logger):
    """Asserts that the sphinx-build script is available.
    """
    logger.debug("Checking if sphinx-build and sphinx-apidoc are available.")

    assert_can_execute(
        ["sphinx-build", "--version"], "sphinx", "plugin python.sphinx")
    assert_can_execute(
        ["sphinx-apidoc", "--version"], "sphinx", "plugin python.sphinx")
开发者ID:wenlien,项目名称:pybuilder,代码行数:9,代码来源:sphinx_plugin.py


示例9: assert_gzip_is_executable

def assert_gzip_is_executable(logger):
    """
        Asserts that the gzip program is executable.
    """
    logger.debug("Checking if gzip is executable.")

    assert_can_execute(command_and_arguments=["gzip", "--version"],
                       prerequisite="gzip",
                       caller="plugin ronn_manpage_plugin")
开发者ID:B-Rich,项目名称:pybuilder,代码行数:9,代码来源:ronn_manpage_plugin.py


示例10: assert_ronn_is_executable

def assert_ronn_is_executable(logger):
    """
        Asserts that the ronn script is executable.
    """
    logger.debug("Checking if ronn is executable.")

    assert_can_execute(command_and_arguments=["ronn", "--version"],
                       prerequisite="ronn",
                       caller="plugin ronn_manpage_plugin")
开发者ID:B-Rich,项目名称:pybuilder,代码行数:9,代码来源:ronn_manpage_plugin.py


示例11: upload_distribution

def upload_distribution(project, logger) :
    project.build_depends_on("devpi")
    assert_can_execute(["devpi", "--version"], prerequisite="devpi PyPi Server", caller="devpi_plugin")

    index_name = "{}/{}".format(project.get_property("devpi_user"), project.get_property("devpi_staging_index"))

    logger.info("Uploading binary distribution in %s to staging index %s", project.expand_path("$dir_dist"), index_name)

    run_devpi_command(project, logger, ["login", project.get_property("devpi_user"), "--password="])
    run_devpi_command(project, logger, ["use", project.get_property("devpi_staging_index")])
    run_devpi_command(project, logger, ["upload", "--no-vcs", "--formats=bdist_wheel,bdist_egg"])
开发者ID:paolodedios,项目名称:shift-detect,代码行数:11,代码来源:devpi.py


示例12: pdoc_prepare

def pdoc_prepare(project, logger):
    """ Asserts that pdoc is executable. """
    logger.debug("Checking if pdoc is executable.")

    assert_can_execute(command_and_arguments=["pdoc", "--version"],
                       prerequisite="pdoc",
                       caller="plugin python.pdoc")

    pdoc_output_dir = project.expand_path("$pdoc_output_dir")
    if not os.path.exists(pdoc_output_dir):
        os.mkdir(pdoc_output_dir)
开发者ID:0xD3ADB33F,项目名称:pybuilder,代码行数:11,代码来源:pdoc_plugin.py


示例13: generate_manpage_with_pandoc

def generate_manpage_with_pandoc(project, logger):
    import os
    import shutil
    import subprocess
    assert_can_execute(['pandoc', '-v'], 'pandoc', 'generate_manpage_with_pandoc')
    subprocess.check_output('pandoc -s -t man man-yadtminion.md -o docs/man/yadtminion.1.man', shell=True)
    subprocess.check_output('rm -f docs/man/yadtminion.1.man.gz && gzip -9 docs/man/yadtminion.1.man', shell=True)

    for script in os.listdir('src/main/scripts'):
        script_manpage = '%s.1.man.gz' % script
        shutil.copyfile('docs/man/yadtminion.1.man.gz', 'docs/man/%s' % script_manpage)
开发者ID:andante-project,项目名称:yadt-minion,代码行数:11,代码来源:build.py


示例14: push_distribution

def push_distribution(project, logger) :
    project.build_depends_on("devpi")
    assert_can_execute(["devpi", "--version"], prerequisite="devpi PyPi Server", caller="devpi_plugin")

    distribution_name = "{}-{}".format(project.name, project.version)
    index_name        = "{}/{}".format(project.get_property("devpi_user"), project.get_property("devpi_release_index"))

    logger.info("Pushing binary distribution %s to release index %s", distribution_name, index_name)

    run_devpi_command(project, logger, ["login", project.get_property("devpi_user"), "--password="])
    run_devpi_command(project, logger, ["use", project.get_property("devpi_release_index")])
    run_devpi_command(project, logger, ["push", distribution_name, index_name])
开发者ID:paolodedios,项目名称:shift-detect,代码行数:12,代码来源:devpi.py


示例15: pdoc_generate

def pdoc_generate(project, logger):
    assert_can_execute(command_and_arguments=["pdoc", "--version"],
                       prerequisite="pdoc",
                       caller=pdoc_generate.__name__)

    logger.info("Generating pdoc documentation")

    command_and_arguments = ["pdoc", "--html", "pybuilder", "--all-submodules", "--overwrite", "--html-dir", "api-doc"]
    source_directory = project.get_property("dir_source_main_python")
    environment = {"PYTHONPATH": source_directory,
                   "PATH": os.environ["PATH"]}

    subprocess.check_call(command_and_arguments, shell=False, env=environment)
开发者ID:010110101001,项目名称:pybuilder,代码行数:13,代码来源:pdoc.py


示例16: check_pychecker_available

def check_pychecker_available(logger):
    logger.debug("Checking availability of pychecker")
    assert_can_execute(("pychecker", ), "pychecker", "plugin python.pychecker")
开发者ID:B-Rich,项目名称:pybuilder,代码行数:3,代码来源:pychecker_plugin.py


示例17: generate_manpage_with_pandoc

def generate_manpage_with_pandoc(project, logger):
    assert_can_execute(["pandoc", "-v"], "pandoc", "generate_manpage_with_pandoc")
    import subprocess

    subprocess.check_output("pandoc -s -t man man-yadtshell.md -o docs/man/yadtshell.1.man", shell=True)
    subprocess.check_output("rm -f docs/man/yadtshell.1.man.gz && gzip -9 docs/man/yadtshell.1.man", shell=True)
开发者ID:yadt,项目名称:yadtshell,代码行数:6,代码来源:build.py


示例18: check_pip_available

def check_pip_available(logger):
    logger.debug("Checking if pip is available")
    assert_can_execute("pip", "pip", "plugin python.install_dependencies")
开发者ID:B-Rich,项目名称:pybuilder,代码行数:3,代码来源:install_dependencies_plugin.py


示例19: check_graphviz_available

def check_graphviz_available(logger):

    logger.debug("Checking availability of graphviz")
    assert_can_execute(("dot", "-V"), "graphviz", "plugin python.snakefood")
    logger.debug("graphviz has been found")
开发者ID:0xD3ADB33F,项目名称:pybuilder,代码行数:5,代码来源:snakefood_plugin.py


示例20: check_snakefood_available

def check_snakefood_available(logger):
    logger.debug("Checking availability of snakefood")
    assert_can_execute(("sfood", "-h"), "sfood", "plugin python.snakefood")
    logger.debug("snakefood has been found")
开发者ID:0xD3ADB33F,项目名称:pybuilder,代码行数:4,代码来源:snakefood_plugin.py



注:本文中的pybuilder.utils.assert_can_execute函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utils.execute_command函数代码示例发布时间:2022-05-25
下一篇:
Python utils.as_list函数代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap