Package sfc :: Package common :: Module paths
[hide private]
[frames] | no frames]

Source Code for Module sfc.common.paths

 1   
 2  import os 
 3  import glob 
 4  import instant 
 5   
6 -def get_abs_ufc_h_path():
7 (ufc_include_dirs, ufc_flags, ufc_libs, ufc_libdirs) = instant.header_and_libs_from_pkgconfig("ufc-1") 8 if len(ufc_include_dirs) == 0: 9 sys_dirs = ["/usr/include", "/usr/local/include", "/opt/include"] 10 for d in sys_dirs: 11 f = glob.glob(os.path.join(d, "ufc.h")) 12 if len(f) == 1: 13 return f[0] 14 raise RuntimeError("ERROR: Found no include dir for ufc.h: %s. FIXME: Need better configuration tools in SyFi!") 15 if len(ufc_include_dirs) > 1: 16 print "WARNING: Found more than one include dir for ufc.h: %s. Using %s. FIXME: Need better configuration tools in SyFi!" % (str(ufc_include_dirs), ufc_include_dirs[0]) 17 return os.path.join(ufc_include_dirs[0], "ufc.h")
18