当前位置: 首页>>代码示例>>Python>>正文


Python utils.assert_can_execute函数代码示例

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


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


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