In pyside-setup/tools/cross_compile_android/main.py, line 161, there is the hard-coded upstream Python repo url.
git clone that somewhere. Then checkout the branch set by PYTHON_VERSION constant hard-coded at the top of the script. (i.e. git checkout 3.10). Then replace the URL in main.py with the local path to your checkout.