port buildscript to python3

port buildscript to python3