Skip to content
Open
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
34 changes: 0 additions & 34 deletions opengate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,38 +62,6 @@ def is_developer_installation():
return True


def restart_with_qt_libs():
"""
Restart the current process with QT libs set.
Only for mac and wheel installation
"""

if is_developer_installation():
# we cannot know the real plugin_path nor if DYLD_LIBRARY_PATH is already correctly set
# so we ignore.
return

plugin_path = os.path.join(get_site_packages_dir(), "opengate_core/plugins")

# do nothing if the plugin_path is already in the env
if (
"DYLD_LIBRARY_PATH" in os.environ
and plugin_path in os.environ["DYLD_LIBRARY_PATH"]
):
return

# Otherwise, we set the env and try to restart the script
new_env = os.environ.copy()
if "DYLD_LIBRARY_PATH" in new_env:
new_env["DYLD_LIBRARY_PATH"] = plugin_path + new_env["DYLD_LIBRARY_PATH"]
else:
new_env["DYLD_LIBRARY_PATH"] = plugin_path

# Restart the process with the new environment
# print(new_env["DYLD_LIBRARY_PATH"])
os.execve(sys.executable, [sys.executable] + sys.argv, new_env)


def restart_with_glibc_tunables():
"""
Restart the current process with GLIBC_TUNABLES set.
Expand Down Expand Up @@ -155,8 +123,6 @@ def restart_with_glibc_tunables():

if sys.platform.startswith("linux"):
restart_with_glibc_tunables()
elif sys.platform.startswith("darwin"):
restart_with_qt_libs()

# subpackages
import opengate.sources
Expand Down
Loading