summaryrefslogtreecommitdiffstats
path: root/bootstrap.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2015-11-13 04:49:22 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2015-11-13 04:49:22 (GMT)
commitc2d974ea65afe9ab1968a16c797155fd799527ca (patch)
tree1fe091d103750eb5e53b8cfd7aac39119e04b398 /bootstrap.py
parent046f1eba099033932261d60b90e8a7cd140adb17 (diff)
downloadSCons-c2d974ea65afe9ab1968a16c797155fd799527ca.zip
SCons-c2d974ea65afe9ab1968a16c797155fd799527ca.tar.gz
SCons-c2d974ea65afe9ab1968a16c797155fd799527ca.tar.bz2
minor changes to fix too many files open when trying to run with pypy
Diffstat (limited to 'bootstrap.py')
-rwxr-xr-xbootstrap.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bootstrap.py b/bootstrap.py
index f3bc105..90917dc 100755
--- a/bootstrap.py
+++ b/bootstrap.py
@@ -27,6 +27,8 @@ import os.path
import sys
import glob
import subprocess
+import filecmp
+import shutil
__doc__ = """bootstrap.py
@@ -127,7 +129,7 @@ def main():
def must_copy(dst, src):
if not os.path.exists(dst):
return 1
- return open(dst, 'rb').read() != open(src, 'rb').read()
+ return filecmp.cmp(dst,src)
# Note: We don't use the getopt module to process the command-line
# arguments because we'd have to teach it about all of the SCons options.
@@ -195,7 +197,8 @@ def main():
os.makedirs(dir)
try: os.unlink(dst)
except: pass
- open(dst, 'wb').write( open(src, 'rb').read() )
+
+ shutil.copyfile(src,dst)
if update_only:
sys.exit(0)