idea159-arbsphere-federated.../sitecustomize.py

13 lines
444 B
Python

"""Site customization to ensure local repo is importable as a package.
This helps CI environments that may spawn isolated interpreters where the
repository root isn't on sys.path by default. We explicitly insert the repo
root to sys.path so local packages like arbsphere are discoverable by tests.
"""
import os
import sys
REPO_ROOT = os.path.dirname(os.path.abspath(__file__))
if REPO_ROOT not in sys.path:
sys.path.insert(0, REPO_ROOT)