Skip to content

Kyojin: open-source engine that runs 100 GB-class open models (GLM-5.3, Qwen3.8, DeepSeek V4.1) on one desktop machine. AMD Strix Halo, NVIDIA RTX and Apple Mac. OpenAI API, built on ExLlamaV3.

Fix CPU test fakes to use POSIX sh and declare aiohttp and jinja2 dependencies

Tristin Stagg34fc44433cdd
diff --git a/pyproject.toml b/pyproject.toml
index edaa593..60cb996 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -28,6 +28,10 @@ dependencies = [
"marisa_trie",
"pydantic",
"llguidance>=1.7.0",
+ # Required by tools/{glm,mimo,qwen}/serve.py (already in
+ # requirements.txt, was missing here so the Nix venv lacked them).
+ "aiohttp",
+ "jinja2",
"triton-windows; platform_system == 'Windows'",
]
diff --git a/tests/test_hip_compiler_cpu.py b/tests/test_hip_compiler_cpu.py
index 3568c32..3892603 100644
--- a/tests/test_hip_compiler_cpu.py
+++ b/tests/test_hip_compiler_cpu.py
@@ -26,8 +26,11 @@ _REAL_SDK_FROM_PACKAGE = hip_compiler._sdk_from_package
def fake_hipcc(path: Path, version: str, log: Path | None = None) -> Path:
path.parent.mkdir(parents=True, exist_ok=True)
+ # NOTE: POSIX sh, not bash: the fakes run wherever pytest runs
+ # (sandboxes and NixOS hosts have no /bin/bash). Only POSIX
+ # constructs are used below.
path.write_text(
- "#!/bin/bash\n"
+ "#!/bin/sh\n"
f'if [ "$1" = "--version" ]; then echo "{version}"; exit 0; fi\n'
+ (f'echo "$0" >> {log}\n' if log else "")
+ 'while [ $# -gt 0 ]; do if [ "$1" = "-o" ]; then echo built > "$2"; fi; shift; done\n')