diff --git a/igniter/bootstrap_repos.py b/igniter/bootstrap_repos.py index c882ec6e49..50b46c36ab 100644 --- a/igniter/bootstrap_repos.py +++ b/igniter/bootstrap_repos.py @@ -1094,24 +1094,8 @@ class BootstrapRepos: directory (Path): path to directory. """ + sys.path.insert(0, directory.as_posix()) - directory /= "repos" - if not directory.exists() and not directory.is_dir(): - return - - roots = [] - for item in directory.iterdir(): - if item.is_dir(): - root = item.as_posix() - if root not in roots: - roots.append(root) - sys.path.insert(0, root) - - pythonpath = os.getenv("PYTHONPATH", "") - paths = pythonpath.split(os.pathsep) - paths += roots - - os.environ["PYTHONPATH"] = os.pathsep.join(paths) @staticmethod def find_openpype_version(version, staging): diff --git a/start.py b/start.py index c066fa3ab7..8944da4ba0 100644 --- a/start.py +++ b/start.py @@ -824,6 +824,7 @@ def _bootstrap_from_code(use_version, use_staging): os.environ["OPENPYPE_REPOS_ROOT"] = _openpype_root # add self to sys.path of current process + # NOTE: this seems to be duplicate of 'add_paths_from_directory' sys.path.insert(0, _openpype_root) # add venv 'site-packages' to PYTHONPATH python_path = os.getenv("PYTHONPATH", "")