From 7c3e42396ac7e97e431340a331cbff5ee665d8f2 Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Fri, 10 Jul 2020 12:20:27 -0700 Subject: [PATCH] invoke install acount for centos prefix issues, add usage of nproc for make -j --- tasks.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tasks.py b/tasks.py index d70df69e..24e2599c 100644 --- a/tasks.py +++ b/tasks.py @@ -85,11 +85,12 @@ def install_grpcio(c: Context, hide: bool) -> None: ) -def build(c: Context, hide: bool) -> None: +def build(c: Context, os_info: OsInfo, hide: bool) -> None: print("building core...") c.run("./bootstrap.sh", hide=hide) - c.run("./configure", hide=hide) - c.run("make", hide=hide) + prefix = "--prefix=/usr" if os_info.like == OsLike.REDHAT else "" + c.run(f"./configure {prefix}", hide=hide) + c.run("make -j$(nproc)", hide=hide) def install_core(c: Context, hide: bool) -> None: @@ -109,7 +110,7 @@ def install_poetry(c: Context, dev: bool, hide: bool) -> None: print("installing core environment using poetry...") c.run(f"poetry install {args}", hide=hide) if dev: - c.run("poetry run pre-commit install") + c.run("poetry run pre-commit install", hide=hide) def install_ospf_mdr(c: Context, os_info: OsInfo, hide: bool) -> None: @@ -136,7 +137,7 @@ def install_ospf_mdr(c: Context, os_info: OsInfo, hide: bool) -> None: "--localstatedir=/var/run/quagga", hide=hide ) - c.run("make", hide=hide) + c.run("make -j$(nproc)", hide=hide) print("installing ospf mdr...") c.run("sudo make install", hide=hide)