10
0
mirror of https://gitlab.com/scemama/EZFIO.git synced 2024-12-22 12:23:34 +01:00

Add configure.py

This commit is contained in:
Anthony Scemama 2015-06-01 16:45:10 +02:00
parent 5dc3509831
commit c29b6066c8

22
configure.py Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env python
import os
if __name__ == '__main__':
d_default = {
"IRPF90" : 'irpf90',
"FC" : 'gfortran -g -ffree-line-length-none -fPIC',
"FCFLAGS" : '-O2',
"RANLIB" : 'ranlib',
"AR" : 'ar',
"NINJA" : 'ninja'
}
with open("make.config",'w') as out:
for var,default in d_default.iteritems():
try:
cur = os.environ[var]
except KeyError:
cur = default
out.write("{0} = {1}\n".format(var,cur))