Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mpicxx = conf.get('mpicxx')
except AttributeError:
mpicc = os.environ.get('MPICC') or find_executable('mpicc')
mpicxx = os.environ.get('MPICXX') or find_executable('mpicxx')
if mpicc:
options.append('--cc='+mpicc)
if mpicxx:
options.append('--cxx='+mpicxx)
options.extend(split_quoted( os.environ.get('UW_CONFIGURE_OPTIONS', '')) )
if 'PETSC_DIR' in os.environ:
options.append('--petsc-dir='+os.environ['PETSC_DIR'])
else:
try:
import petsc
options.append('--petsc-dir='+petsc.get_config()['PETSC_DIR'])
except:
pass
log.info('configure options:')
for opt in options:
log.info(' '*4 + opt)
# Run UW configure
if dry_run: return
python = find_executable('python3')
command = [python, './configure.py'] + options
status = os.system(" ".join(command))
if status != 0: raise RuntimeError(status)