Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing LD_LIBRARY_PATH startup error if LD_LIBRARY_PATH has not been set before. #8

Closed
19 changes: 11 additions & 8 deletions client/ayon_usd/hooks/pre_resolver_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,17 @@ def execute(self):
self.launch_context.env["PYTHONPATH"] += os.pathsep.join(python_path)

if system().lower() == "windows":
Lypsolon marked this conversation as resolved.
Show resolved Hide resolved
self.launch_context.env["PATH"] += os.pathsep.join(ld_path)
else:
self.launch_context.env["LD_LIBRARY_PATH"] += \
os.pathsep.join(ld_path)

# is there used in the application? Can it hold multiple values?
# self.launch_context.env["USD_ASSET_RESOLVER"] = \
# resolver_dir.as_posix()
if ld_path:
self.launch_context.env["PATH"] = \
os.pathsep + os.pathsep.join(ld_path)
elif ld_path:
if "LD_LIBRARY_PATH" in os.environ:
self.launch_context.env["LD_LIBRARY_PATH"] += \
os.pathsep + os.pathsep.join(ld_path)
else:
self.launch_context.env["LD_LIBRARY_PATH"] = \
os.pathsep + os.pathsep.join(ld_path)

Lypsolon marked this conversation as resolved.
Show resolved Hide resolved

# TODO: move debug options to AYON settings
self.launch_context.env["TF_DEBUG"] = "1"
Expand Down