9979 Support python3 for in-gate tools

Review Request #1283 - Created Nov. 14, 2018 and submitted

Information
Andy Fiddaman
illumos-gate
master
9979
2a85fda...
Reviewers
general
9979 Support python3 for in-gate tools

This change relates to the onbld tools which are written in python such as git-pbchk and wsdiff. It:

  • enables the building of python3 versions of onbld modules providing BUILDPY3TOOLS is not set to an octothorpe;

  • allows the python2 modules to be omitted from the onbld package via BUILDPY2TOOLS='#';

  • Provides a variable through which the default interpreter (shebang) for these can be set - TOOLS_PYTHON - which defaults to $(PYTHON) (or $(PYTHON3) if BUILDPY2TOOLS='#')

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.

Testing

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.

Issues

  • 0
  • 4
  • 0
  • 4
Description From Last Updated
Andy Fiddaman
Yuri Pankov
Andy Fiddaman
Toomas Soome
Alexander Pyhalov
Peter Tribble
Andy Fiddaman
Andy Fiddaman
Andy Fiddaman
Peter Tribble
Alexander Pyhalov
Alexander Pyhalov
Toomas Soome
Andrew Stormont
Andy Fiddaman
Andy Fiddaman
Andy Fiddaman
Toomas Soome
Peter Tribble
Alexander Pyhalov
Andy Fiddaman
Review request changed

Status: Closed (submitted)

Loading...