How to use the pybuilder.core.after function in pybuilder

To help you get started, we’ve selected a few pybuilder examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pybuilder / pybuilder / src / main / python / pybuilder / plugins / python / pylint_plugin.py View on Github external
@after("prepare")
def check_pylint_availability(logger):
    logger.debug("Checking availability of pychecker")
    assert_can_execute(("pylint", ), "pylint", "plugin python.pylint")
    logger.debug("pylint has been found")
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / python / frosted_plugin.py View on Github external
@after("prepare")
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")
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / python / flake8_plugin.py View on Github external
@after("prepare")
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")
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / python / distutils_plugin.py View on Github external
@after("package")
def write_setup_script(project, logger):
    setup_script = project.expand_path("$dir_dist", "setup.py")
    logger.info("Writing setup.py as %s", setup_script)

    with open(setup_script, "w") as setup_file:
        setup_file.write(render_setup_script(project))

    os.chmod(setup_script, 0o755)
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / python / cram_plugin.py View on Github external
@after("prepare")
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")
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / python / sphinx_plugin.py View on Github external
@after("prepare")
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")
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / python / distutils_plugin.py View on Github external
@after("prepare")
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")
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / ronn_manpage_plugin.py View on Github external
@after("prepare")
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")
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / python / outdated_dependencies_plugin.py View on Github external
@after("prepare")
def assert_pip_api_is_available(logger):
    try:
        import pip
        logger.debug("pip API version {0}".format(pip.__version__))
    except (ImportError, AttributeError):
        raise MissingPrerequisiteException("pip", "update_plugin")