[Distutils] copy_file patch
Bastian Kleineidam
calvin@cs.uni-sb.de
Thu, 22 Jun 2000 02:30:58 +0200 (CEST)
Hello,
apply this patch to make copy_file return the target file instead of 0/1:
diff -BurN --minimal --exclude=*.pyc distutils.orig/distutils/file_util.py distutils/distutils/file_util.py
--- distutils.orig/distutils/file_util.py Sat May 20 18:05:34 2000
+++ distutils/distutils/file_util.py Thu Jun 22 02:27:45 2000
@@ -123,7 +123,7 @@
if update and not newer (src, dst):
if verbose:
print "not copying %s (output up-to-date)" % src
- return 0
+ return dst
try:
action = _copy_action[link]
@@ -137,7 +137,7 @@
print "%s %s -> %s" % (action, src, dst)
if dry_run:
- return 1
+ return dst
# On a Mac, use the native file copy routine
if os.name == 'mac':
@@ -171,7 +171,7 @@
if preserve_mode:
os.chmod (dst, S_IMODE (st[ST_MODE]))
- return 1
+ return dst
# copy_file ()