port buildscript to python3