no idea, but clearly the issue is between distutils and setuptools.
So the thing is that locally we migrated from distutils to setuptools. In later version setuptools included some distutils functionallity to enable a better migration.
You might want to do the from setuptools.command.build_py import build_py as _build_py command on a shell instead of running the whole build script and try to find the proper version that is working for you. Setuptools is a big module that's changing quite a lot, you might need a lower version as well, but I cannot tell you from the top of my heart which one. Some of them had issues, and we blacklisted some of them before 48.0, but maybe some around 5X.YY or installing manually distutils might help, but again, be aware of versions. Couldn't find any open issue, so it might be a problem with the latest.