syrte
5/17/2017 - 4:32 PM

detect_need_build.py

if pyx_file is not None:
    pyx_mtime = os.path.getmtime(pyx_file)
else:
    pyx_mtime = 0.  # so ext_file always newer than pyx_file

# need build:
#   force is True, ext_file non exists, or older than pyx_file
# user should take care of deps by himself
if (force or not os.path.isfile(ext_file) or
        os.path.getmtime(ext_file) < pyx_mtime):
    need_build = True
else:
    need_build = False