From 613e14c012430d7df3f9494cd0acccbed20165ec Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Fri, 22 Apr 2022 11:25:40 +0200 Subject: [PATCH] don't look into repos directory to be added to sys path --- start.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/start.py b/start.py index 35a14a059e..c066fa3ab7 100644 --- a/start.py +++ b/start.py @@ -823,23 +823,14 @@ def _bootstrap_from_code(use_version, use_staging): version_path = Path(_openpype_root) os.environ["OPENPYPE_REPOS_ROOT"] = _openpype_root - repos = [] - # Check for "openpype/repos" directory for sumodules - # NOTE: Is not used at this moment but can be re-used in future - repos_dir = os.path.join(_openpype_root, "repos") - if os.path.exists(repos_dir): - for name in os.listdir(repos_dir): - repos.append(os.path.join(repos_dir, name)) - - # add self to python paths - repos.insert(0, _openpype_root) - for repo in repos: - sys.path.insert(0, repo) + # add self to sys.path of current process + sys.path.insert(0, _openpype_root) # add venv 'site-packages' to PYTHONPATH python_path = os.getenv("PYTHONPATH", "") split_paths = python_path.split(os.pathsep) - # Add repos as first in list - split_paths = repos + split_paths + # add self to python paths + split_paths.insert(0, _openpype_root) + # last one should be venv site-packages # this is slightly convoluted as we can get here from frozen code too # in case when we are running without any version installed.