Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
don't look for repos directory in add_paths_from_directory
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Apr 22, 2022
1 parent db10343 commit 38d93c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
18 changes: 1 addition & 17 deletions igniter/bootstrap_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1094,24 +1094,8 @@ def add_paths_from_directory(directory: Path) -> None:
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)
sys.path.insert(0, directory.as_posix())

@staticmethod
def find_openpype_version(version, staging):
Expand Down
1 change: 1 addition & 0 deletions start.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", "")
Expand Down

0 comments on commit 38d93c1

Please sign in to comment.