Support python3 for in-gate tools
A number of tools in gate are written in python. With the approaching end-of-support for python2 and as distributions move towards python3, these should be updated so that they can run under either version.
There should also be a mechanism for selection of which major version of python is used to run these tools during gate builds.
Updated by Andy Fiddaman over 1 year ago
By default (if nothing is changed in the .env file) the developer/build/onbld package will gain python3 versions of the onbld modules alongside python2 versions. The tools themselves will continue to have a python2 shebang line. In the future, if a distribution wishes to switch to python3 for the tools, they can set TOOLS_PYTHON=/usr/bin/python3.5 or similar and if they want to stop building and shipping the python2 modules then BUILDPY2TOOLS='#' will achieve that. OmniOS bloody no longer uses python2 for the onbld components.
Tested all modified onbld tools from proto with both python3 and python2, for example:
% python3 proto/root_i386-nd/opt/onbld/bin/git-pbchk -p master Comments: These bug synopses don't match the database entries: Synopsis of 9979 is wrong: should be: 'Support python3 for in-gate tools' is: 'Support python3 for in-gate tools-FRED' % python2 proto/root_i386-nd/opt/onbld/bin/git-pbchk -p master Comments: These bug synopses don't match the database entries: Synopsis of 9979 is wrong: should be: 'Support python3 for in-gate tools' is: 'Support python3 for in-gate tools-FRED'
Did three test builds with BUILDPY2TOOLS='#', BUILDPY3TOOLS='#' and neither set. Inspected developer/build/onbld package contents each time and ran the range of tools against some sample files.
Updated by Electric Monk about 1 year ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
commit ca13eaa51ee900abba73dfb6624e492f7e48863e Author: Andy Fiddaman <email@example.com> Date: 2019-01-10T16:09:52.000Z 9979 Support python3 for in-gate tools Reviewed by: Toomas Soome <firstname.lastname@example.org> Reviewed by: Peter Tribble <email@example.com> Reviewed by: Alexander Pyhalov <firstname.lastname@example.org> Reviewed by: Andrew Stormont <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>