install: add local install support for the install emane task
This commit is contained in:
parent
f83f71c074
commit
efdce20afb
1 changed files with 10 additions and 3 deletions
13
tasks.py
13
tasks.py
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue