bpo-41771: Update how bdist_wininst loads Python so postinstall scripts again work. by mhammond · Pull Request #22210 · python/cpython

Also updates the build script so the correct executable name is created, and
updates the executable.

(I'm aware bdist_wininst is deprecated, but until it's removed it should continue to work)

This will require backporting to 3.9 and 3.8.

It's been a while :) Please let me know if I got anything wrong in this process.

https://bugs.python.org/issue41771