Skip to content

Commit 17eb689

Browse files
committed
Fix up LD_LIBRARY_PATH
1 parent e8ac6fc commit 17eb689

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tasks/pyfaasm.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
PYFAASM_DIR = join(PROJ_ROOT, "pyfaasm")
1515
NATIVE_LIBS = join(FAASM_NATIVE_INSTALL, "lib")
16+
USR_LOCAL_LIBS = "/usr/local/lib"
17+
LD_LIBRARY_PATH = "{}:{}".format(NATIVE_LIBS, USR_LOCAL_LIBS)
1618

1719

1820
@task
@@ -35,10 +37,17 @@ def test(ctx):
3537
Run pyfaasm tests natively
3638
"""
3739
shell_env = copy(environ)
40+
ld_path = shell_env.get("LD_LIBRARY_PATH")
41+
ld_path = (
42+
"{}:{}".format(LD_LIBRARY_PATH, ld_path)
43+
if ld_path
44+
else LD_LIBRARY_PATH
45+
)
46+
3847
shell_env.update(
3948
{
4049
"PYTHON_LOCAL_CHAINING": "1",
41-
"LD_LIBRARY_PATH": NATIVE_LIBS,
50+
"LD_LIBRARY_PATH": LD_LIBRARY_PATH,
4251
}
4352
)
4453

0 commit comments

Comments
 (0)