[docs] [issue29349] Update old Python 2 code in Docs/tools/extensions/patchlevel.py
report at bugs.python.org
Sun Jan 29 17:28:46 EST 2017
David Bolen added the comment:
2.7.12 (/usr/local/bin) is used for the build slave and main external commands (such as hg and sphinx) and is in the buildslave path, but 2.5.1 is still the default in /usr/bin so can get used for processes with a restricted environment. Tiger's original 2.3 is present but unused.
The DMG build-installer script itself runs under 2.5.1, because it specifies "python2.5" in its command to the slave. I believe that was originally added once the system 2.3 couldn't be used.
During the DMG construction process, a particular step might, I suppose use 2.5.1 or 2.7.12 depending on whether it's internal to the build script, something using the same executable as the script, a subprocess with limited path, or an independent utility (like sphinx) referencing 2.7.
I believe Ned's comment in issue 17861 about 2.6+ is a reference to the sphinx step, which is covered by the fact that sphinx is using the newer 2.7.12.
What appears to break in this specific case is some of the preparation - specifically the Makefile referencing patchlevel is running "python". That should work (2.7.12) if it inherits the overall build slave environment (which has /usr/local/bin first) but I think the install script filters that, so it's probably getting the /usr/bin/python 2.5.1 version.
I've just changed the default /usr/bin/python to be 2.7 so external processes run by build-installer should get 2.7. I don't think that will break anything else currently done on the machine, but I'll deal with any fallout if needed. I'm rerunning build 59 now.
As in issue 28039 there's no immediate need to change the installer script itself, but since it's clearly the last hold out, I'll find some time to test that I've got any pre-requisites for it set up at which point the build master could be changed to remove the python2.5 reference.
Python tracker <report at bugs.python.org>
More information about the docs