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

Fix the bug of loading shared libraries. #561

Merged
merged 3 commits into from
Feb 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions tools/installer/cefpython3.__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@

package_dir = os.path.dirname(os.path.abspath(__file__))

# This loads the libcef.so library for the subprocess executable.
# On Mac it works without setting library paths.
os.environ["LD_LIBRARY_PATH"] = package_dir
# This loads the libcef.so library for the subprocess executable on Linux.
# TODO: Use -Wl,-rpath=\$$ORIGIN in Makefile.
ld_library_path = os.environ.get("LD_LIBRARY_PATH")
if ld_library_path and ld_library_path.strip():
os.environ["LD_LIBRARY_PATH"] = package_dir + os.pathsep + ld_library_path
else:
os.environ["LD_LIBRARY_PATH"] = package_dir

# This env variable will be returned by cefpython.GetModuleDirectory().
os.environ["CEFPYTHON3_PATH"] = package_dir
Expand Down