SHARE
TWEET

Untitled

a guest Mar 21st, 2017 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def modified_md5_decider(dependency, target, prev_ni):
  2.     """SCons MD5 Decider function that checks if targets have changed"""
  3.     # Use default checking for changes in the source file
  4.     source_changed = dependency.changed_content(target, prev_ni)
  5.     if source_changed:
  6.         return source_changed
  7.     else:
  8.         target_changed = False
  9.         # If target node does not implement get_csig(), do not try to determine
  10.         # whether to rebuild. (csig = content signature)
  11.         try:
  12.             target_info = target.get_stored_info()
  13.             if target_info.ninfo.csig != target.get_csig():
  14.                 target_changed = True
  15.         except AttributeError:
  16.             pass
  17.  
  18.         return target_changed
  19.  
  20. # Set the SCons Decider function
  21. Decider(modified_md5_decider)
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top