KokosDev commited on
Commit
ceab523
·
verified ·
1 Parent(s): 1b0e889

Fix Space src bootstrap path resolution for root deployment

Browse files
Files changed (1) hide show
  1. space_utils.py +2 -1
space_utils.py CHANGED
@@ -11,7 +11,8 @@ from typing import Any, Dict, List, Mapping, Optional, Sequence, Tuple
11
 
12
  def _bootstrap_src_path() -> None:
13
  here = Path(__file__).resolve()
14
- for candidate in (here.parents[2] / "src", here.parents[1] / "src"):
 
15
  if candidate.exists() and str(candidate) not in sys.path:
16
  sys.path.insert(0, str(candidate))
17
  return
 
11
 
12
  def _bootstrap_src_path() -> None:
13
  here = Path(__file__).resolve()
14
+ candidates = [parent / "src" for parent in (here.parent, *tuple(here.parents))]
15
+ for candidate in candidates:
16
  if candidate.exists() and str(candidate) not in sys.path:
17
  sys.path.insert(0, str(candidate))
18
  return