replace CMakeLists.txt with python script