import os, subprocess

dir_path = os.path.dirname(os.path.realpath(__file__))

def make_dir_safe(dir):
  if not os.path.exists(dir):
    os.mkdir(dir)

def make_dir_safe_and_go(dir):
  make_dir_safe(dir)
  os.chdir(dir)

subprocess.run(["./configure",
  "--prefix=" + dir_path + "/gmp-6.1.2_install", "--enable-fat"])
os.system("make")
subprocess.run(["make", "install"])

