Skip to content
Snippets Groups Projects
Commit 6c6d2213 authored by Jonas Lewandrowski's avatar Jonas Lewandrowski
Browse files

Fix init.py

parent 5ac8738a
No related branches found
No related tags found
1 merge request!29Migrate armarx to armarx core
......@@ -16,18 +16,23 @@ def inject() -> bool:
:returns: true if the slice loading is activated, false if it was already
activated
"""
print("start inject")
if get_code_generation_type() == CodeGenerationType.STATIC:
print("static")
python_build_dir = get_python_build_dir()
if python_build_dir in sys.path:
return False
sys.path.append(python_build_dir)
return True
else:
print("dynamic")
if any(isinstance(c, ArmarXProxyFinder) for c in sys.meta_path):
return False
sys.meta_path.insert(0, ArmarXProxyFinder())
return True
# auto inject
inject()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment