Skip to content

Commit 5702630

Browse files
committed
fix(dispatcher): remove tools dispatcher bin entirely
Modified: • build_hooks.py (+5/-7 lines) • setup.py (+1/-1 lines) [gitship-generated]
1 parent 0278efa commit 5702630

8 files changed

Lines changed: 6 additions & 1000 deletions

File tree

build_hooks.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,21 @@
3232
from pathlib import Path
3333
import shutil
3434

35-
3635
def _run_post_install():
37-
# ADD THIS CHECK AT THE TOP
3836
if sys.platform in ('emscripten', 'wasm32'):
3937
print(" [build_hooks] WASM environment detected, skipping C dispatcher build.")
4038
return
4139
marker = Path(sys.executable).parent / ".omnipkg_dispatch_compiled"
4240
if marker.exists():
4341
marker.unlink()
44-
hook = Path(__file__).parent / "tools" / "dispatcher_bin" / "_post_install.py"
45-
if hook.exists():
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():
4645
import importlib.util
47-
spec = importlib.util.spec_from_file_location("_post_install", hook)
46+
spec = importlib.util.spec_from_file_location("setup", setup_py)
4847
mod = importlib.util.module_from_spec(spec)
4948
spec.loader.exec_module(mod)
50-
mod.install_dispatcher_binary(Path(sys.executable).parent)
51-
49+
mod._install_dispatcher_binary(Path(sys.executable).parent)
5250

5351
# Override build_editable — this is what `pip install -e .` calls
5452
def build_editable(wheel_directory, config_settings=None, metadata_directory=None):

sed

Whitespace-only changes.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def _install_dispatcher_binary(install_dir=None):
3535
Supports gcc (Linux/macOS) and MSVC cl.exe (Windows).
3636
"""
3737
repo_root = Path(__file__).parent
38-
c_source = repo_root / "tools" / "dispatcher_bin" / "dispatcher.c"
38+
c_source = repo_root / "src" / "omnipkg" / "dispatcher.c"
3939
if not c_source.exists():
4040
print(" [dispatcher] No C source found, skipping binary install")
4141
return

tools/dispatcher_bin/_post_install.py

Lines changed: 0 additions & 88 deletions
This file was deleted.

tools/dispatcher_bin/build.sh

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)