write_if_different¶
- extension_helpers.write_if_different(filename, data)¶
Write
data
tofilename
, if the content of the file is different.This can be useful if e.g. generating
.c
or.h
files, to make sure that Python does not re-build unchanged files.