-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhkinstall.py
More file actions
24 lines (18 loc) · 814 Bytes
/
hkinstall.py
File metadata and controls
24 lines (18 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from hkpilot.utils.cmake import CMake
class hkLibToolPackTemplate(CMake):
def __init__(self, path):
super().__init__(path)
self._package_name = "hk-LibToolPackTemplate"
def post_install(self):
# Run standard post_install step
super().post_install()
# Link compiled tool into
compiled_tools_folder = os.environ.get("HK_COMPILEDTOOLS_DIR")
logger.info(f"Linking installation to {compiled_tools_folder}")
if not os.path.exists(compiled_tools_folder):
logger.debug("Folder doesn't exist: creating it")
os.mkdir(compiled_tools_folder)
symlink = os.path.join(compiled_tools_folder, self._package_name)
# if os.path.exists(symlink):
os.symlink(self._install_folder, symlink)
return True