mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
don't look into repos directory to be added to sys path
This commit is contained in:
parent
b9b199c61d
commit
613e14c012
1 changed files with 5 additions and 14 deletions
19
start.py
19
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue