/
usr
/
lib64
/
python2.7
/
distutils
/
/usr/lib64/python2.7/distutils
mkdir
upload
Name
Size
Mode
Actions
command/
-
0755
rm
archive_util.py
8219
0644
edit
dl
rm
archive_util.pyc
7601
0644
edit
dl
rm
archive_util.pyo
7601
0644
edit
dl
rm
bcppcompiler.py
14941
0644
edit
dl
rm
bcppcompiler.pyc
7882
0644
edit
dl
rm
bcppcompiler.pyo
7882
0644
edit
dl
rm
ccompiler.py
46726
0644
edit
dl
rm
ccompiler.pyc
36882
0644
edit
dl
rm
ccompiler.pyo
36741
0644
edit
dl
rm
cmd.py
19270
0644
edit
dl
rm
cmd.pyc
16804
0644
edit
dl
rm
cmd.pyo
16804
0644
edit
dl
rm
config.py
4134
0644
edit
dl
rm
config.pyc
3565
0644
edit
dl
rm
config.pyo
3565
0644
edit
dl
rm
core.py
9019
0644
edit
dl
rm
core.pyc
7536
0644
edit
dl
rm
core.pyo
7536
0644
edit
dl
rm
cygwinccompiler.py
17735
0644
edit
dl
rm
cygwinccompiler.pyc
9825
0644
edit
dl
rm
cygwinccompiler.pyo
9825
0644
edit
dl
rm
debug.py
162
0644
edit
dl
rm
debug.pyc
254
0644
edit
dl
rm
debug.pyo
254
0644
edit
dl
rm
dep_util.py
3509
0644
edit
dl
rm
dep_util.pyc
3180
0644
edit
dl
rm
dep_util.pyo
3180
0644
edit
dl
rm
dir_util.py
7868
0644
edit
dl
rm
dir_util.pyc
6786
0644
edit
dl
rm
dir_util.pyo
6786
0644
edit
dl
rm
dist.py
50049
0644
edit
dl
rm
dist.pyc
39176
0644
edit
dl
rm
dist.pyo
39176
0644
edit
dl
rm
emxccompiler.py
11931
0644
edit
dl
rm
emxccompiler.pyc
7467
0644
edit
dl
rm
emxccompiler.pyo
7467
0644
edit
dl
rm
errors.py
3494
0644
edit
dl
rm
errors.pyc
6285
0644
edit
dl
rm
errors.pyo
6285
0644
edit
dl
rm
extension.py
10904
0644
edit
dl
rm
extension.pyc
7412
0644
edit
dl
rm
extension.pyo
7186
0644
edit
dl
rm
fancy_getopt.py
17948
0644
edit
dl
rm
fancy_getopt.pyc
11958
0644
edit
dl
rm
fancy_getopt.pyo
11781
0644
edit
dl
rm
filelist.py
12689
0644
edit
dl
rm
filelist.pyc
10756
0644
edit
dl
rm
filelist.pyo
10756
0644
edit
dl
rm
file_util.py
8131
0644
edit
dl
rm
file_util.pyc
6750
0644
edit
dl
rm
file_util.pyo
6750
0644
edit
dl
rm
log.py
1686
0644
edit
dl
rm
log.pyc
2786
0644
edit
dl
rm
log.pyo
2786
0644
edit
dl
rm
msvc9compiler.py
31004
0644
edit
dl
rm
msvc9compiler.pyc
21497
0644
edit
dl
rm
msvc9compiler.pyo
21424
0644
edit
dl
rm
msvccompiler.py
23637
0644
edit
dl
rm
msvccompiler.pyc
17525
0644
edit
dl
rm
msvccompiler.pyo
17525
0644
edit
dl
rm
README
295
0644
edit
dl
rm
spawn.py
8648
0644
edit
dl
rm
spawn.pyc
6427
0644
edit
dl
rm
spawn.pyo
6427
0644
edit
dl
rm
sysconfig.py
17707
0644
edit
dl
rm
sysconfig.py.debug-build
17622
0644
edit
dl
rm
sysconfig.pyc
13404
0644
edit
dl
rm
sysconfig.pyo
13404
0644
edit
dl
rm
text_file.py
12428
0644
edit
dl
rm
text_file.pyc
9259
0644
edit
dl
rm
text_file.pyo
9259
0644
edit
dl
rm
unixccompiler.py
14222
0644
edit
dl
rm
unixccompiler.py.distutils-rpath
13677
0644
edit
dl
rm
unixccompiler.pyc
8229
0644
edit
dl
rm
unixccompiler.pyo
8229
0644
edit
dl
rm
util.py
18236
0644
edit
dl
rm
util.pyc
14386
0644
edit
dl
rm
util.pyo
14386
0644
edit
dl
rm
version.py
11433
0644
edit
dl
rm
version.pyc
7208
0644
edit
dl
rm
version.pyo
7208
0644
edit
dl
rm
versionpredicate.py
5095
0644
edit
dl
rm
versionpredicate.pyc
5542
0644
edit
dl
rm
versionpredicate.pyo
5542
0644
edit
dl
rm
__init__.py
236
0644
edit
dl
rm
__init__.pyc
415
0644
edit
dl
rm
__init__.pyo
415
0644
edit
dl
rm
Edit:
/usr/lib64/python2.7/distutils/dep_util.py
(3509B)
"""distutils.dep_util Utility functions for simple, timestamp-based dependency of files and groups of files; also, function based entirely on such timestamp dependency analysis.""" __revision__ = "$Id$" import os from stat import ST_MTIME from distutils.errors import DistutilsFileError def newer(source, target): """Tells if the target is newer than the source. Return true if 'source' exists and is more recently modified than 'target', or if 'source' exists and 'target' doesn't. Return false if both exist and 'target' is the same age or younger than 'source'. Raise DistutilsFileError if 'source' does not exist. Note that this test is not very accurate: files created in the same second will have the same "age". """ if not os.path.exists(source): raise DistutilsFileError("file '%s' does not exist" % os.path.abspath(source)) if not os.path.exists(target): return True return os.stat(source)[ST_MTIME] > os.stat(target)[ST_MTIME] def newer_pairwise(sources, targets): """Walk two filename lists in parallel, testing if each source is newer than its corresponding target. Return a pair of lists (sources, targets) where source is newer than target, according to the semantics of 'newer()'. """ if len(sources) != len(targets): raise ValueError, "'sources' and 'targets' must be same length" # build a pair of lists (sources, targets) where source is newer n_sources = [] n_targets = [] for source, target in zip(sources, targets): if newer(source, target): n_sources.append(source) n_targets.append(target) return n_sources, n_targets def newer_group(sources, target, missing='error'): """Return true if 'target' is out-of-date with respect to any file listed in 'sources'. In other words, if 'target' exists and is newer than every file in 'sources', return false; otherwise return true. 'missing' controls what we do when a source file is missing; the default ("error") is to blow up with an OSError from inside 'stat()'; if it is "ignore", we silently drop any missing source files; if it is "newer", any missing source files make us assume that 'target' is out-of-date (this is handy in "dry-run" mode: it'll make you pretend to carry out commands that wouldn't work because inputs are missing, but that doesn't matter because you're not actually going to run the commands). """ # If the target doesn't even exist, then it's definitely out-of-date. if not os.path.exists(target): return True # Otherwise we have to find out the hard way: if *any* source file # is more recent than 'target', then 'target' is out-of-date and # we can immediately return true. If we fall through to the end # of the loop, then 'target' is up-to-date and we return false. target_mtime = os.stat(target)[ST_MTIME] for source in sources: if not os.path.exists(source): if missing == 'error': # blow up when we stat() the file pass elif missing == 'ignore': # missing source dropped from continue # target's dependency list elif missing == 'newer': # missing source means target is return True # out-of-date if os.stat(source)[ST_MTIME] > target_mtime: return True return False
Save
cmd:
run