Python 3.14 can't find systemroot in wasi-libc build

It looks like setting --dir no longer works with 3.14.1. Not knowing what else to do, I filed [WASI-SDK] CPython 3.14.1 can no longer find systemroot in wasi-libc build (3.13.11 works) · Issue #143537 · python/cpython · GitHub with CPython.

$ cd ~/python-3.14.2-wasi_sdk-24/
$ wasmtime --dir . python.wasm            
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Fatal Python error: Failed to import encodings module
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x012c0ae8 (most recent call first):
  <no Python frame>

I tested it with 3.13.11 and it indeed works, as described earlier in the thread.

This also got filed at CPython 3.14.1 can no longer find systemroot in wasi-libc build (3.13.11 works) · Issue #11 · brettcannon/cpython-wasi-build · GitHub and I have fixed it for the next 3.14 and 3.14 releases (for affected versions you just need to move tome files around).