From 7f724c1cea95b459a9eb418bceac5b518f658e4a Mon Sep 17 00:00:00 2001 From: Jiawei Zhao Date: Tue, 24 Jun 2025 13:02:50 +0800 Subject: [PATCH] fix: Add PYTHONPATH configuration to PDM scripts for module imports Fixes issue where `pdm run main --solution ref --loader week1` would fail with "ModuleNotFoundError: No module named 'tiny_llm_ref'" Signed-off-by: Jiawei Zhao --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index afd3f1a..d2119a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,7 @@ build-ext-test.working_dir = "src/extensions" build-ext-ref.cmd = "python build.py" build-ext-ref.working_dir = "src/extensions_ref" main.cmd = "python main.py" +main.env = {PYTHONPATH = "src"} main-week1.cmd = "python main.py --loader week1" main-week2.cmd = "python main.py --loader week2" batch-main.cmd = "python batch-main.py"