Spaces:
Sleeping
Sleeping
Fix Space src bootstrap path resolution for root deployment
Browse files- 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 |
-
|
|
|
|
| 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
|