Ticket #63782: dep_util.py.patch

File dep_util.py.patch, 1.1 KB (added by jmroot (Joshua Root), 2 years ago)
  • Lib/distutils/dep_util.py

    old new  
    66
    77import os
    88from distutils.errors import DistutilsFileError
     9from distutils import log
    910
    1011
    1112def newer (source, target):
     
    7576    from stat import ST_MTIME
    7677    target_mtime = os.stat(target)[ST_MTIME]
    7778    for source in sources:
     79        log.info("checking dependency '%s'", source)
    7880        if not os.path.exists(source):
    7981            if missing == 'error':      # blow up when we stat() the file
    8082                pass
    8183            elif missing == 'ignore':   # missing source dropped from
    8284                continue                #  target's dependency list
    8385            elif missing == 'newer':    # missing source means target is
     86                log.info("dependency '%s' is missing", source)
    8487                return 1                #  out-of-date
    8588
    8689        source_mtime = os.stat(source)[ST_MTIME]
    8790        if source_mtime > target_mtime:
     91            log.info("dependency '%s' is newer than '%s'", source, target)
    8892            return 1
    8993    else:
    9094        return 0