mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-22 06:01:35 +00:00
26 lines
756 B
Python
26 lines
756 B
Python
import os
|
|
import site
|
|
import sys
|
|
|
|
# First, drop system-sites related paths.
|
|
original_sys_path = sys.path[:]
|
|
known_paths = set()
|
|
for path in {"/usr/local/lib/python3.12/site-packages"}:
|
|
site.addsitedir(path, known_paths=known_paths)
|
|
system_paths = set(
|
|
os.path.normcase(path) for path in sys.path[len(original_sys_path) :]
|
|
)
|
|
original_sys_path = [
|
|
path for path in original_sys_path if os.path.normcase(path) not in system_paths
|
|
]
|
|
sys.path = original_sys_path
|
|
|
|
# Second, add lib directories.
|
|
# ensuring .pth file are processed.
|
|
for path in [
|
|
"/tmp/pip-build-env-wwuhobll/overlay/lib/python3.12/site-packages",
|
|
"/tmp/pip-build-env-wwuhobll/normal/lib/python3.12/site-packages",
|
|
]:
|
|
assert path not in sys.path
|
|
site.addsitedir(path)
|