/
opt
/
alt
/
python27
/
lib64
/
python2.7
/
distutils
/
/opt/alt/python27/lib64/python2.7/distutils
mkdir
upload
Name
Size
Mode
Actions
command/
-
0755
rm
archive_util.py
8219
0644
edit
dl
rm
archive_util.pyc
7705
0644
edit
dl
rm
archive_util.pyo
7705
0644
edit
dl
rm
bcppcompiler.py
14941
0644
edit
dl
rm
bcppcompiler.pyc
7999
0644
edit
dl
rm
bcppcompiler.pyo
7999
0644
edit
dl
rm
ccompiler.py
46726
0644
edit
dl
rm
ccompiler.pyc
37597
0644
edit
dl
rm
ccompiler.pyo
37456
0644
edit
dl
rm
cmd.py
19270
0644
edit
dl
rm
cmd.pyc
17285
0644
edit
dl
rm
cmd.pyo
17285
0644
edit
dl
rm
config.py
4134
0644
edit
dl
rm
config.pyc
3656
0644
edit
dl
rm
config.pyo
3656
0644
edit
dl
rm
core.py
9019
0644
edit
dl
rm
core.pyc
7588
0644
edit
dl
rm
core.pyo
7588
0644
edit
dl
rm
cygwinccompiler.py
17735
0644
edit
dl
rm
cygwinccompiler.pyc
9981
0644
edit
dl
rm
cygwinccompiler.pyo
9981
0644
edit
dl
rm
debug.py
162
0644
edit
dl
rm
debug.pyc
267
0644
edit
dl
rm
debug.pyo
267
0644
edit
dl
rm
dep_util.py
3509
0644
edit
dl
rm
dep_util.pyc
3232
0644
edit
dl
rm
dep_util.pyo
3232
0644
edit
dl
rm
dir_util.py
7868
0644
edit
dl
rm
dir_util.pyc
6877
0644
edit
dl
rm
dir_util.pyo
6877
0644
edit
dl
rm
dist.py
50049
0644
edit
dl
rm
dist.pyc
40047
0644
edit
dl
rm
dist.pyo
40047
0644
edit
dl
rm
emxccompiler.py
11931
0644
edit
dl
rm
emxccompiler.pyc
7584
0644
edit
dl
rm
emxccompiler.pyo
7584
0644
edit
dl
rm
errors.py
3494
0644
edit
dl
rm
errors.pyc
6545
0644
edit
dl
rm
errors.pyo
6545
0644
edit
dl
rm
extension.py
10904
0644
edit
dl
rm
extension.pyc
7464
0644
edit
dl
rm
extension.pyo
7238
0644
edit
dl
rm
fancy_getopt.py
17948
0644
edit
dl
rm
fancy_getopt.pyc
12231
0644
edit
dl
rm
fancy_getopt.pyo
12054
0644
edit
dl
rm
filelist.py
12689
0644
edit
dl
rm
filelist.pyc
10977
0644
edit
dl
rm
filelist.pyo
10977
0644
edit
dl
rm
file_util.py
8131
0644
edit
dl
rm
file_util.pyc
6815
0644
edit
dl
rm
file_util.pyo
6815
0644
edit
dl
rm
log.py
1686
0644
edit
dl
rm
log.pyc
2942
0644
edit
dl
rm
log.pyo
2942
0644
edit
dl
rm
msvc9compiler.py
31004
0644
edit
dl
rm
msvc9compiler.pyc
21900
0644
edit
dl
rm
msvc9compiler.pyo
21827
0644
edit
dl
rm
msvccompiler.py
23637
0644
edit
dl
rm
msvccompiler.pyc
17863
0644
edit
dl
rm
msvccompiler.pyo
17863
0644
edit
dl
rm
README
295
0644
edit
dl
rm
spawn.py
8648
0644
edit
dl
rm
spawn.pyc
6518
0644
edit
dl
rm
spawn.pyo
6518
0644
edit
dl
rm
sysconfig.py
17707
0644
edit
dl
rm
sysconfig.py.debug-build
17622
0644
edit
dl
rm
sysconfig.pyc
13609
0644
edit
dl
rm
sysconfig.pyo
13609
0644
edit
dl
rm
text_file.py
12428
0644
edit
dl
rm
text_file.pyc
9402
0644
edit
dl
rm
text_file.pyo
9402
0644
edit
dl
rm
unixccompiler.py
14222
0644
edit
dl
rm
unixccompiler.py.distutils-rpath
13677
0644
edit
dl
rm
unixccompiler.pyc
8385
0644
edit
dl
rm
unixccompiler.pyo
8385
0644
edit
dl
rm
util.py
18236
0644
edit
dl
rm
util.pyc
14568
0644
edit
dl
rm
util.pyo
14568
0644
edit
dl
rm
version.py
11433
0644
edit
dl
rm
version.pyc
7403
0644
edit
dl
rm
version.pyo
7403
0644
edit
dl
rm
versionpredicate.py
5095
0644
edit
dl
rm
versionpredicate.pyc
5633
0644
edit
dl
rm
versionpredicate.pyo
5633
0644
edit
dl
rm
__init__.py
236
0644
edit
dl
rm
__init__.pyc
428
0644
edit
dl
rm
__init__.pyo
428
0644
edit
dl
rm
Edit:
/opt/alt/python27/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