File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434
3535def _run_post_install ():
3636 if sys .platform in ('emscripten' , 'wasm32' ):
37- print (" [build_hooks] WASM environment detected, skipping C dispatcher build." )
3837 return
3938 marker = Path (sys .executable ).parent / ".omnipkg_dispatch_compiled"
4039 if marker .exists ():
4140 marker .unlink ()
42- # Import and call the setup.py installer which has full MSVC/gcc support
43- setup_py = Path (__file__ ).parent / "setup.py"
44- if setup_py .exists ():
45- import importlib .util
46- spec = importlib .util .spec_from_file_location ("setup" , setup_py )
47- mod = importlib .util .module_from_spec (spec )
48- spec .loader .exec_module (mod )
49- mod ._install_dispatcher_binary (Path (sys .executable ).parent )
41+ # Delegate to the runtime installer in dispatcher.py which has full MSVC support
42+ try :
43+ src_dir = Path (__file__ ).parent / "src" / "omnipkg"
44+ if src_dir not in sys .path :
45+ sys .path .insert (0 , str (Path (__file__ ).parent / "src" ))
46+ from omnipkg .dispatcher import _maybe_install_c_dispatcher
47+ _maybe_install_c_dispatcher ()
48+ except Exception as e :
49+ print (f" [dispatcher] post-install skipped: { e } " )
5050
5151# Override build_editable — this is what `pip install -e .` calls
5252def build_editable (wheel_directory , config_settings = None , metadata_directory = None ):
You can’t perform that action at this time.
0 commit comments