File tree Expand file tree Collapse file tree 3 files changed +4345
-7
lines changed
Expand file tree Collapse file tree 3 files changed +4345
-7
lines changed Original file line number Diff line number Diff line change 2020.env
2121.venv /
2222# Generated Python bindings (keep __init__.py but ignore generated files)
23- python /isomdl_uniffi /isomdl_uniffi.py
2423python /isomdl_uniffi /* .so
2524python /isomdl_uniffi /* .dylib
2625python /isomdl_uniffi /* .dll
Original file line number Diff line number Diff line change 1414
1515__version__ = "0.1.0"
1616
17- # Import the main module
18- try :
19- from .isomdl_uniffi import *
20- except ImportError as e :
17+ # Import the main module - try multiple paths to handle different wheel structures
18+ _imported = False
19+ _import_error = None
20+
21+ # Try: isomdl_uniffi/isomdl_uniffi.py (generated by maturin for mixed projects)
22+ if not _imported :
23+ try :
24+ from .isomdl_uniffi import *
25+ _imported = True
26+ except ImportError as e :
27+ _import_error = e
28+
29+ # Try: isomdl_uniffi/isomdl_uniffi/isomdl_uniffi.py (nested structure)
30+ if not _imported :
31+ try :
32+ from .isomdl_uniffi .isomdl_uniffi import *
33+ _imported = True
34+ except ImportError :
35+ pass
36+
37+ if not _imported :
2138 raise ImportError (
2239 "Failed to import isomdl_uniffi bindings. "
2340 "This usually means the Rust library hasn't been built yet. "
2441 f"Please run './python/precommit/build-bindings.sh' first. "
25- f"Original error: { e } "
26- ) from e
42+ f"Original error: { _import_error } "
43+ )
You can’t perform that action at this time.
0 commit comments