Port checks to python3 and other packaging improvements
The main reason for this MR is #937103 but while fixing it, i noticed a few other items that needed working and hence the remaining commits
The main reason for this MR is #937103 but while fixing it, i noticed a few other items that needed working and hence the remaining commits