diff --git a/tasks.py b/tasks.py index adb9dfde..0388acc6 100644 --- a/tasks.py +++ b/tasks.py @@ -314,6 +314,36 @@ def install_core_files(c, local=False, verbose=False, prefix=DEFAULT_PREFIX): c.run(f"sudo cp -r package/examples {examples_dir}", hide=hide) +@task( + help={ + "dev": "install development mode", + "verbose": "enable verbose", + "install-type": "used to force an install type, " + "can be one of the following (redhat, debian)", + "no-python": "avoid installing python system dependencies", + }, +) +def build( + c, + verbose=False, + install_type=None, + no_python=False, +): + print("setting up to build core packages") + c.run("sudo -v", hide=True) + p = Progress(verbose) + hide = not verbose + os_info = get_os(install_type) + with p.start("installing system dependencies"): + install_system(c, os_info, hide, no_python) + with p.start("installing system grpcio-tools"): + install_grpcio(c, hide) + with p.start("building core"): + build_core(c, hide) + with p.start(f"building rpm/deb packages"): + c.run("make fpm", hide=hide) + + @task( help={ "dev": "install development mode",