|
@@ -111,6 +111,7 @@ def _run_visible_cmd(
|
|
|
# Strip Anlogic libs for non-TD lanes so apt/python stay healthy.
|
|
# Strip Anlogic libs for non-TD lanes so apt/python stay healthy.
|
|
|
clean = os.environ.copy()
|
|
clean = os.environ.copy()
|
|
|
keep_td = name == "td"
|
|
keep_td = name == "td"
|
|
|
|
|
+ python_deps = os.environ.get("PROD2U_PYTHON_DEPS", "")
|
|
|
if not keep_td:
|
|
if not keep_td:
|
|
|
for key in (
|
|
for key in (
|
|
|
"LD_LIBRARY_PATH",
|
|
"LD_LIBRARY_PATH",
|
|
@@ -125,6 +126,11 @@ def _run_visible_cmd(
|
|
|
"PERL_MM_OPT",
|
|
"PERL_MM_OPT",
|
|
|
):
|
|
):
|
|
|
clean.pop(key, None)
|
|
clean.pop(key, None)
|
|
|
|
|
+ if python_deps:
|
|
|
|
|
+ dependency_root = Path(python_deps).resolve()
|
|
|
|
|
+ if not dependency_root.is_dir():
|
|
|
|
|
+ raise RuntimeError(f"configured Python dependency root is missing: {dependency_root}")
|
|
|
|
|
+ clean["PYTHONPATH"] = str(dependency_root)
|
|
|
if env:
|
|
if env:
|
|
|
clean.update(env)
|
|
clean.update(env)
|
|
|
return run_visible(
|
|
return run_visible(
|