diff --git a/clvm_tools/clvmc.py b/clvm_tools/clvmc.py index c72d625..b043d05 100644 --- a/clvm_tools/clvmc.py +++ b/clvm_tools/clvmc.py @@ -1,7 +1,6 @@ # clvm_tools setuptools integration from distutils import log -from distutils.dep_util import newer import os import pathlib @@ -22,7 +21,13 @@ def compile_clvm_text(text, search_paths): def compile_clvm(input_path, output_path, search_paths=[]): - if newer(input_path, output_path): + input_path = pathlib.Path(input_path) + output_path = pathlib.Path(output_path) + try: + output_time = output_path.stat().st_mtime + except FileNotFoundError: + output_time = None + if output_time is None or input_path.stat().st_mtime > output_time: log.info("clvmcc %s -o %s" % (input_path, output_path)) with open(input_path) as f: text = f.read()