From c91d8df790692acfcaef1bc81fe040240e8a66ea Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Fri, 29 Jul 2022 14:12:17 -0700 Subject: [PATCH] install: added task using a subset of the previous auto install to support auto setup and building of core packages --- tasks.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) 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",