From efdce20afb2c9a766b44339b23fd83cba04a84ff Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Fri, 11 Sep 2020 15:51:01 -0700 Subject: [PATCH] install: add local install support for the install emane task --- tasks.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tasks.py b/tasks.py index 17493c17..845e0f16 100644 --- a/tasks.py +++ b/tasks.py @@ -340,9 +340,10 @@ def install(c, dev=False, verbose=False, local=False, prefix=DEFAULT_PREFIX): @task( help={ "verbose": "enable verbose", + "local": "used determine if core is installed locally, default is False", }, ) -def install_emane(c, verbose=False): +def install_emane(c, verbose=False, local=False): """ install emane and the python bindings """ @@ -382,8 +383,14 @@ def install_emane(c, verbose=False): with c.cd(emane_dir): c.run("sudo make install", hide=hide) with p.start("installing python binding for core"): - with c.cd(DAEMON_DIR): - c.run(f"poetry run pip install {emane_python_dir.absolute()}", hide=hide) + if local: + with c.cd(str(emane_python_dir)): + c.run("sudo python3 -m pip install .", hide=hide) + else: + with c.cd(DAEMON_DIR): + c.run( + f"poetry run pip install {emane_python_dir.absolute()}", hide=hide + ) @task(