How To Install CPython from Github `main` Branch in an Isolated Way?

You should always do a clean build. Our build system is not reliable if you switch between commits. When bisecting, I always start my repro script like this:

set -e
git clean -fdx
./configure  # using whatever options I need for the repro
make
# <= here comes the repro commands, usually some variant of executing the locally built python.exe
2 Likes