/
usr
/
lib64
/
python2.6
/
distutils
/
/usr/lib64/python2.6/distutils
mkdir
upload
Name
Size
Mode
Actions
command/
-
0755
rm
archive_util.py
6319
0644
edit
dl
rm
archive_util.pyc
5497
0644
edit
dl
rm
archive_util.pyo
5497
0644
edit
dl
rm
bcppcompiler.py
15091
0644
edit
dl
rm
bcppcompiler.pyc
8105
0644
edit
dl
rm
bcppcompiler.pyo
8105
0644
edit
dl
rm
ccompiler.py
48863
0644
edit
dl
rm
ccompiler.pyc
37826
0644
edit
dl
rm
ccompiler.pyo
37633
0644
edit
dl
rm
cmd.py
19253
0644
edit
dl
rm
cmd.pyc
16930
0644
edit
dl
rm
cmd.pyo
16930
0644
edit
dl
rm
config.py
4164
0644
edit
dl
rm
config.pyc
3694
0644
edit
dl
rm
config.pyo
3694
0644
edit
dl
rm
core.py
9081
0644
edit
dl
rm
core.pyc
7698
0644
edit
dl
rm
core.pyo
7698
0644
edit
dl
rm
cygwinccompiler.py
17292
0644
edit
dl
rm
cygwinccompiler.pyc
9529
0644
edit
dl
rm
cygwinccompiler.pyo
9529
0644
edit
dl
rm
debug.py
265
0644
edit
dl
rm
debug.pyc
299
0644
edit
dl
rm
debug.pyo
299
0644
edit
dl
rm
dep_util.py
3632
0644
edit
dl
rm
dep_util.pyc
3200
0644
edit
dl
rm
dep_util.pyo
3200
0644
edit
dl
rm
dir_util.py
8122
0644
edit
dl
rm
dir_util.pyc
6904
0644
edit
dl
rm
dir_util.pyo
6904
0644
edit
dl
rm
dist.py
48007
0644
edit
dl
rm
dist.pyc
38164
0644
edit
dl
rm
dist.pyo
38164
0644
edit
dl
rm
emxccompiler.py
11912
0644
edit
dl
rm
emxccompiler.pyc
7550
0644
edit
dl
rm
emxccompiler.pyo
7550
0644
edit
dl
rm
errors.py
3720
0644
edit
dl
rm
errors.pyc
6358
0644
edit
dl
rm
errors.pyo
6358
0644
edit
dl
rm
extension.py
10325
0644
edit
dl
rm
extension.pyc
7408
0644
edit
dl
rm
extension.pyo
7183
0644
edit
dl
rm
fancy_getopt.py
18427
0644
edit
dl
rm
fancy_getopt.pyc
12494
0644
edit
dl
rm
fancy_getopt.pyo
12300
0644
edit
dl
rm
filelist.py
12872
0644
edit
dl
rm
filelist.pyc
10815
0644
edit
dl
rm
filelist.pyo
10815
0644
edit
dl
rm
file_util.py
8316
0644
edit
dl
rm
file_util.pyc
6871
0644
edit
dl
rm
file_util.pyo
6871
0644
edit
dl
rm
log.py
1606
0644
edit
dl
rm
log.pyc
2571
0644
edit
dl
rm
log.pyo
2571
0644
edit
dl
rm
msvc9compiler.py
28701
0644
edit
dl
rm
msvc9compiler.pyc
20503
0644
edit
dl
rm
msvc9compiler.pyo
20431
0644
edit
dl
rm
msvccompiler.py
23760
0644
edit
dl
rm
msvccompiler.pyc
17795
0644
edit
dl
rm
msvccompiler.pyo
17795
0644
edit
dl
rm
mwerkscompiler.py
10339
0644
edit
dl
rm
mwerkscompiler.pyc
7674
0644
edit
dl
rm
mwerkscompiler.pyo
7674
0644
edit
dl
rm
README
1014
0644
edit
dl
rm
spawn.py
6991
0644
edit
dl
rm
spawn.pyc
5598
0644
edit
dl
rm
spawn.pyo
5598
0644
edit
dl
rm
sysconfig.py
22869
0644
edit
dl
rm
sysconfig.pyc
16011
0644
edit
dl
rm
sysconfig.pyo
16011
0644
edit
dl
rm
text_file.py
15145
0644
edit
dl
rm
text_file.pyc
11251
0644
edit
dl
rm
text_file.pyo
11251
0644
edit
dl
rm
unixccompiler.py
14494
0644
edit
dl
rm
unixccompiler.pyc
9097
0644
edit
dl
rm
unixccompiler.pyo
9097
0644
edit
dl
rm
util.py
21978
0644
edit
dl
rm
util.pyc
16426
0644
edit
dl
rm
util.pyo
16426
0644
edit
dl
rm
version.py
11486
0644
edit
dl
rm
version.pyc
7244
0644
edit
dl
rm
version.pyo
7244
0644
edit
dl
rm
versionpredicate.py
5095
0644
edit
dl
rm
versionpredicate.pyc
5597
0644
edit
dl
rm
versionpredicate.pyo
5597
0644
edit
dl
rm
__init__.py
670
0644
edit
dl
rm
__init__.pyc
439
0644
edit
dl
rm
__init__.pyo
439
0644
edit
dl
rm
Edit:
/usr/lib64/python2.6/distutils/dep_util.py
(3632B)
"""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.""" # This module should be kept compatible with Python 2.1. __revision__ = "$Id: dep_util.py 58049 2007-09-08 00:34:17Z skip.montanaro $" import os from distutils.errors import DistutilsFileError def newer (source, target): """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. """ if not os.path.exists(source): raise DistutilsFileError, ("file '%s' does not exist" % os.path.abspath(source)) if not os.path.exists(target): return 1 from stat import ST_MTIME mtime1 = os.stat(source)[ST_MTIME] mtime2 = os.stat(target)[ST_MTIME] return mtime1 > mtime2 # newer () 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 i in range(len(sources)): if newer(sources[i], targets[i]): n_sources.append(sources[i]) n_targets.append(targets[i]) return (n_sources, n_targets) # newer_pairwise () 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 1 # 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. from stat import ST_MTIME 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 1 # out-of-date source_mtime = os.stat(source)[ST_MTIME] if source_mtime > target_mtime: return 1 else: return 0 # newer_group ()
Save
cmd:
run