Commit 6a4b973
committed
ENH: Enable relative import of Slicer Python-wrapped libraries
Improve the fallback mechanism in `slicer/__init__.py` to support relative import
of Slicer Python-wrapped libraries (kits) when they are distributed as standalone
Python packages (e.g., `slicer-mrml`).
This change allows importing modules using relative paths when absolute imports
fail, supporting package layouts like:
```
slicer_mrml/
├── __init__.py
├── vtkAddon/
├── vtkSegmentationCore.so
└── qMRMLWidgetsPythonQt/
```
This makes it possible to use Slicer Python kits in isolated package distributions
outside the monolithic Slicer application structure.1 parent d6c7975 commit 6a4b973
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
| |||
0 commit comments