Lines Matching refs:os

3 import os
14 if lang in os.environ and os.environ[lang] != '':
15 lv = os.environ[lang]
21 os.environ[lang] = lv
84 filename = os.path.basename(sys.argv[0])
86 petsc_arch=os.path.splitext(os.path.basename(sys.argv[0]))[0]
208 if b"\r\n" in open(os.path.join('lib','petsc','bin','petscmpiexec'),"rb").read():
217 …if os.path.exists('/usr/bin/cygcheck.exe') and os.path.exists('/usr/bin/link.exe') and chkwincompi…
228 if os.path.exists('/usr/bin/cygcheck.exe'):
229 buf = os.popen('/usr/bin/cygcheck.exe -c cygwin').read()
267 if os.path.exists('/usr/bin/cygcheck.exe'):
268 path = os.path.join(os.getcwd(),'lib','petsc','bin','win32fe')
273 sys.argv[l] = option[:option.find('=')+1]+os.path.join(path,'win32fe_'+i)
281 sys.argv[l] = option[:option.find('=')+1]+os.path.join(path,'win32fe_'+i)
286 if os.path.exists('/etc/redhat-release'):
304 if not hasattr(os,'ST_NOEXEC'): return # novermin
305 if 'TMPDIR' in os.environ: tmpDir = os.environ['TMPDIR']
307 if os.statvfs(tmpDir).f_flag & os.ST_NOEXEC: # novermin
308 if os.statvfs(os.path.abspath('.')).f_flag & os.ST_NOEXEC: # novermin
310 …print('* TMPDIR '+tmpDir+' has noexec attribute. Same with '+os.path.abspath('.')+' where PETSc is…
316 newTmp = os.path.abspath('tmp-petsc')
320 if not os.path.isdir(newTmp): os.mkdir(os.path.abspath(newTmp))
321 os.environ['TMPDIR'] = newTmp
327 cray = os.getenv('CRAY_SITE_LIST_DIR')
329 cray = os.getenv('CRAYPE_DIR')
343 import os
345 if os.path.islink(logfile) and not os.path.isfile(logfile): os.remove(logfile)
358 import os
361 lib_dir = os.path.join(petsc_arch,'lib')
362 petsc_dir = os.path.join(petsc_arch,'lib','petsc')
363 conf_dir = os.path.join(petsc_arch,'lib','petsc','conf')
364 if not os.path.isdir(petsc_arch): os.mkdir(petsc_arch)
365 if not os.path.isdir(lib_dir): os.mkdir(lib_dir)
366 if not os.path.isdir(petsc_dir): os.mkdir(petsc_dir)
367 if not os.path.isdir(conf_dir): os.mkdir(conf_dir)
370 new_file = os.path.join(conf_dir,curr_file)
374 if os.path.isfile(new_bkp): os.remove(new_bkp)
375 if os.path.isfile(new_file): os.rename(new_file,new_bkp)
376 if os.path.isfile(curr_file):
378 os.remove(curr_file)
379 if os.path.isfile(new_file): os.symlink(new_file,curr_file)
381 if os.path.realpath(curr_bkp) == os.path.realpath(new_file):
382 if os.path.isfile(curr_bkp): os.remove(curr_bkp)
383 if os.path.isfile(new_bkp): os.symlink(new_bkp,curr_bkp)
394 petscdir = os.getcwd()
396 sys.path.append(os.path.join(petscdir,'lib','petsc','bin'))
398 file = os.path.join(petscdir,'.nagged')
405 configDir = os.path.abspath('config')
406 bsDir = os.path.join(configDir, 'BuildSystem')
407 if not os.path.isdir(configDir):
408 raise RuntimeError('Run configure from $PETSC_DIR, not '+os.path.abspath('.'))
448 … sys.argv[l] = '--with-fc='+os.path.join(os.path.abspath('.'),'lib','petsc','bin','petscnagfor')