-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path__init__.py
33 lines (28 loc) · 1.07 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import os
import sys
__all__ = ['set_import_search_path']
def set_import_search_path():
# The assumption here is that this script is in the src directory
# which is one directory above ovpl
ovpl_directory_path = os.path.dirname(os.path.abspath(__file__))
src_path = ovpl_directory_path + "/src"
tests_path = ovpl_directory_path + "/tests"
utils_path = src_path + "/utils"
adapters_path = src_path + "/adapters"
httplogging_path = src_path + "/httplogging"
vmmanager_path = src_path + "/vmmanager"
if ovpl_directory_path not in sys.path:
sys.path.append(ovpl_directory_path)
if src_path not in sys.path:
sys.path.append(src_path)
if tests_path not in sys.path:
sys.path.append(tests_path)
if utils_path not in sys.path:
sys.path.append(utils_path)
if adapters_path not in sys.path:
sys.path.append(adapters_path)
if httplogging_path not in sys.path:
sys.path.append(httplogging_path)
if vmmanager_path not in sys.path:
sys.path.append(vmmanager_path)
set_import_search_path()