diff --git a/src/proxy/build_pythoncore.py b/src/proxy/build_pythoncore.py index 481dec5..ecc857f 100644 --- a/src/proxy/build_pythoncore.py +++ b/src/proxy/build_pythoncore.py @@ -4,7 +4,7 @@ _EXCLUDE_MODULES = ["ensurepip", "idlelib", "test", "tkinter", "turtle_demo", "venv"] -libdir = Path(sys.executable).parent.joinpath("Lib") +libdir = Path(sys.base_prefix).joinpath("Lib") assert libdir.exists() with zipfile.PyZipFile(sys.argv[1], optimize=2, mode="w") as fp: @@ -12,3 +12,4 @@ for path in libdir.iterdir(): if path.is_dir() and path.name not in _EXCLUDE_MODULES: fp.writepy(path) # pyright: ignore[reportArgumentType] + assert fp.namelist(), "Generated pythoncore.zip is empty. This will not block the build but will break MO2 at runtime!"