I have written GitHub - FFY00/python-bootstrap: Helper script to bootstrap a Python environment to help with this, it is a script that runs GitHub - pypa/build: A simple, correct PEP 517 build frontend and GitHub - pradyunsg/installer: A low-level library for installing from a Python wheel distribution. (with Add CLI by FFY00 · Pull Request #66 · pradyunsg/installer · GitHub) from source to build and install the required tooling to start building and installing Python packages.
I am planning to propose it for PyPA inclusion but wanted to write some docs about the bootstrapping process first.
distutils is deprecated and will be removed in Python 3.12, so I wanted to get the bootstrapping process in shape before that.