def run_scripts(package_location, scripts):
 path = os.path.join(package_location, 'scripts/')
 cwd = os.getcwd()
 os.chdir(path)
 for script in scripts:
  if os.path.exists(script):
   try:
    subprocess.check_call(script, stdout=sys.stdout, stderr=sys.stderr)
   except Exception:
    os.chdir(cwd)
    raise
 os.chdir(cwd)

def run_scripts ( package_location , scripts ) : path = os . path . join ( package_location , 'scripts/' ) cwd = os . getcwd ( ) os . chdir ( path ) for script in scripts : if os . path . exists ( script ) : try : subprocess . check_call ( script , stdout = sys . stdout , stderr = sys . stderr ) except Exception : os . chdir ( cwd ) raise os . chdir ( cwd )
search for installation scripts speficied by the scripts list .