moved flags to python for static compilation

probably too complex