fix not depend on orisys-common
This commit is contained in:
@@ -22,19 +22,13 @@ for path in (OPERATOR_SRC, PUBLIC_SRC):
|
||||
if str(path) not in sys.path:
|
||||
sys.path.insert(0, str(path))
|
||||
|
||||
# Prefer sibling checkouts for editable Sensor-owned preview.
|
||||
ORISYS_COMMON_SRC = REPO.parent / "orisys-common" / "src"
|
||||
if ORISYS_COMMON_SRC.is_dir() and str(ORISYS_COMMON_SRC) not in sys.path:
|
||||
sys.path.insert(0, str(ORISYS_COMMON_SRC))
|
||||
|
||||
# Prefer sibling orisys-sdk checkout for Sensor-owned preview.
|
||||
ORISYS_SRC = REPO.parent / "orisys-sdk" / "src"
|
||||
if ORISYS_SRC.is_dir() and str(ORISYS_SRC) not in sys.path:
|
||||
sys.path.insert(0, str(ORISYS_SRC))
|
||||
|
||||
from orisys_common.runtime import configure_app_root # noqa: E402
|
||||
from sensor_bench.paths import prefer_local_sensor_bundles # noqa: E402
|
||||
|
||||
configure_app_root(REPO)
|
||||
prefer_local_sensor_bundles(REPO)
|
||||
|
||||
from sensor_bench_operator.__main__ import main # noqa: E402
|
||||
|
||||
@@ -22,19 +22,13 @@ SRC = ROOT / "src"
|
||||
if str(SRC) not in sys.path:
|
||||
sys.path.insert(0, str(SRC))
|
||||
|
||||
# Prefer sibling checkouts for editable Sensor-owned preview.
|
||||
ORISYS_COMMON_SRC = ROOT.parent / "orisys-common" / "src"
|
||||
if ORISYS_COMMON_SRC.is_dir() and str(ORISYS_COMMON_SRC) not in sys.path:
|
||||
sys.path.insert(0, str(ORISYS_COMMON_SRC))
|
||||
|
||||
# Prefer sibling orisys-sdk checkout for Sensor-owned preview.
|
||||
ORISYS_SRC = ROOT.parent / "orisys-sdk" / "src"
|
||||
if ORISYS_SRC.is_dir() and str(ORISYS_SRC) not in sys.path:
|
||||
sys.path.insert(0, str(ORISYS_SRC))
|
||||
|
||||
from orisys_common.runtime import configure_app_root # noqa: E402
|
||||
from sensor_bench.paths import prefer_local_sensor_bundles # noqa: E402
|
||||
|
||||
configure_app_root(ROOT)
|
||||
prefer_local_sensor_bundles(ROOT)
|
||||
|
||||
from sensor_bench.main import main # noqa: E402
|
||||
|
||||
@@ -142,13 +142,6 @@ def prefer_local_sensor_bundles(root: Path | None = None) -> Path | None:
|
||||
global _PREFERRED_SENSOR_ROOT
|
||||
|
||||
resolved_root = Path(root).resolve() if root is not None else app_root()
|
||||
try:
|
||||
from orisys_common.runtime import configure_app_root
|
||||
|
||||
configure_app_root(resolved_root)
|
||||
except Exception: # noqa: BLE001
|
||||
pass
|
||||
|
||||
sensors = (resolved_root / "sensors").resolve()
|
||||
if not sensors.is_dir():
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user