Building distribution cpython 3.13.5 fails

@moderators
I am building the cpython 3.13.5 distribution on macOS by following the readme cpython/Mac/BuildScript/README.rst at main · python/cpython · GitHub . But it fails with an error.

Copying required shared libraries
Fix file modes
Install python documentation
rm -rf ./venv
rm -rf build/*

ERROR: Ignored the following versions that require a different python version: 8.0.0 Requires-Python >=3.10; 8.0.0rc1 Requires-Python >=3.10; 8.0.1 Requires-Python >=3.10; 8.0.2 Requires-Python >=3.10; 8.1.0 Requires-Python >=3.10; 8.1.1 Requires-Python >=3.10; 8.1.2 Requires-Python >=3.10; 8.1.3 Requires-Python >=3.10; 8.2.0 Requires-Python >=3.11; 8.2.0rc1 Requires-Python >=3.11; 8.2.0rc2 Requires-Python >=3.11; 8.2.1 Requires-Python >=3.11; 8.2.2 Requires-Python >=3.11; 8.2.3 Requires-Python >=3.11; 8.3.0 Requires-Python >=3.11

ERROR: Could not find a version that satisfies the requirement sphinx~=8.2.0 (from versions: 0.1.61611, 0.1.61798, 0.1.61843, 0.1.61945, 0.1.61950, 0.2, 0.3, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.5, 0.5.1, 0.5.2b1, 0.5.2, 0.6b1, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 1.0b1, 1.0b2, 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.1, 1.1.1, 1.1.2, 1.1.3, 1.2b1, 1.2b2, 1.2b3, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.3b1, 1.3b2, 1.3b3, 1.3, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.4a1, 1.4b1, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.5a1, 1.5a2, 1.5b1, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.6b1, 1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knows how to resolve the issue? I am on macOS Sequoia 15.5.

I also tried by changing the version to 8.2.3 at cpython/Doc/requirements.txt at main · python/cpython · GitHub and cpython/Doc/conf.py at main · python/cpython · GitHub but get the error ERROR: No matching distribution found for sphinx~=8.2.3

Looks like the issue is with virtual environment gets the python 3.9 from Xcode. But the Sphinx 8.2.0 does not support python 3.9. I try creating a virtual environment but always remove and create a new one using the Python from Xcode. Any help to fix the issue would be appreciated.