install: add local install support for the install emane task

This commit is contained in:
Blake Harnden 2020-09-11 15:51:01 -07:00
parent f83f71c074
commit efdce20afb

View file

@ -340,9 +340,10 @@ def install(c, dev=False, verbose=False, local=False, prefix=DEFAULT_PREFIX):
@task( @task(
help={ help={
"verbose": "enable verbose", "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 install emane and the python bindings
""" """
@ -382,8 +383,14 @@ def install_emane(c, verbose=False):
with c.cd(emane_dir): with c.cd(emane_dir):
c.run("sudo make install", hide=hide) c.run("sudo make install", hide=hide)
with p.start("installing python binding for core"): with p.start("installing python binding for core"):
with c.cd(DAEMON_DIR): if local:
c.run(f"poetry run pip install {emane_python_dir.absolute()}", hide=hide) 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( @task(