Esempio n. 1
0
 def c_file_out_of_date(self, source_path):
     if debug_timestamps:
         print "Checking whether", source_path, "is out of date"
     c_path = map_suffix(source_path, pyx_to_c_suffix, ".c")
     if not os.path.exists(c_path):
         if debug_timestamps:
             print "...yes, c file doesn't exist"
         return 1
     c_time = modification_time(c_path)
     if file_newer_than(source_path, c_time):
         if debug_timestamps:
             print "...yes, newer than c file"
         return 1
     pos = [source_path]
     module_name = self.extract_module_name(source_path)
     pxd_path = self.find_pxd_file(module_name, pos)
     if pxd_path and file_newer_than(pxd_path, c_time):
         if debug_timestamps:
             print "...yes, pxd file newer than c file"
         return 1
     dep_path = replace_suffix(source_path, ".dep")
     if not os.path.exists(dep_path):
         if debug_timestamps:
             print "...yes, dep file does not exist"
         return 1
     for kind, name in self.read_dependency_file(source_path):
         if kind == "cimport":
             dep_path = self.find_pxd_file(name, pos)
         elif kind == "include":
             dep_path = self.search_include_directories(name, pos)
         else:
             continue
         if dep_path and file_newer_than(dep_path, c_time):
             if debug_timestamps:
                 print "...yes,", dep_path, "newer than c file"
             return 1
     if debug_timestamps:
         print "...no"
Esempio n. 2
0
 def c_file_out_of_date(self, source_path):
     if debug_timestamps:
         print "Checking whether", source_path, "is out of date"
     c_path = map_suffix(source_path, pyx_to_c_suffix, ".c")
     if not os.path.exists(c_path):
         if debug_timestamps:
             print "...yes, c file doesn't exist"
         return 1
     c_time = modification_time(c_path)
     if file_newer_than(source_path, c_time):
         if debug_timestamps:
             print "...yes, newer than c file"
         return 1
     pos = [source_path]
     module_name = self.extract_module_name(source_path)
     pxd_path = self.find_pxd_file(module_name, pos)
     if pxd_path and file_newer_than(pxd_path, c_time):
         if debug_timestamps:
             print "...yes, pxd file newer than c file"
         return 1
     dep_path = replace_suffix(source_path, ".dep")
     if not os.path.exists(dep_path):
         if debug_timestamps:
             print "...yes, dep file does not exist"
         return 1
     for kind, name in self.read_dependency_file(source_path):
         if kind == "cimport":
             dep_path = self.find_pxd_file(name, pos)
         elif kind == "include":
             dep_path = self.search_include_directories(name, pos)
         else:
             continue
         if dep_path and file_newer_than(dep_path, c_time):
             if debug_timestamps:
                 print "...yes,", dep_path, "newer than c file"
             return 1
     if debug_timestamps:
         print "...no"
Esempio n. 3
0
 def dep_file_out_of_date(self, source_path):
     dep_path = replace_suffix(source_path, ".dep")
     if not os.path.exists(dep_path):
         return 1
     dep_time = modification_time(dep_path)
     return file_newer_than(source_path, dep_time)
Esempio n. 4
0
 def dep_file_out_of_date(self, source_path):
     dep_path = replace_suffix(source_path, ".dep")
     if not os.path.exists(dep_path):
         return 1
     dep_time = modification_time(dep_path)
     return file_newer_than(source_path, dep_time)