import os import subprocess Import('globalEnv') env = globalEnv.Clone() env['MONGOC_1_13_1_PATH'] = os.path.join(env['MONGOCPATH'], 'mongo-c-driver') cmake_build_path = os.path.join(env['MONGOC_LIB_PATH'], 'cmake_build') if not os.path.exists(cmake_build_path): os.makedirs(cmake_build_path) if not os.path.exists(env["MONGOC_LIB_PATH"]): os.makedirs(env["MONGOC_LIB_PATH"]) cwd = os.getcwd() os.chdir(cmake_build_path) cmakeCall = "cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF " cmakeCall += "-DCMAKE_INSTALL_PREFIX=" + env["MONGOC_LIB_PATH"] + " " cmakeCall += env["MONGOC_1_13_1_PATH"] print(cmakeCall) os.system(cmakeCall) os.system("make") os.system("make install") os.chdir(cwd)