Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Python3 ArmarX
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
Python3 ArmarX
Commits
6c6d2213
Commit
6c6d2213
authored
2 years ago
by
Jonas Lewandrowski
Browse files
Options
Downloads
Patches
Plain Diff
Fix init.py
parent
5ac8738a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!29
Migrate armarx to armarx core
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
armarx_core/__init__.py
+5
-0
5 additions, 0 deletions
armarx_core/__init__.py
with
5 additions
and
0 deletions
armarx_core/__init__.py
+
5
−
0
View file @
6c6d2213
...
...
@@ -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
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment