Source

SCons / QMTest / SConscript

Diff from to

QMTest/SConscript

 #
 
 import os.path
+import string
 
 Import('build_dir', 'env')
 
 def copy(target, source, env):
     t = str(target[0])
     s = str(source[0])
-    open(t, 'wb').write(open(s, 'rb').read())
+    c = open(s, 'rb').read()
+    # Note:  We construct the __ VERSION __ substitution string at
+    # run-time so it doesn't get replaced when this file gets copied
+    # into the tree for packaging.
+    c = string.replace(c, '__' + 'VERSION' + '__', env['VERSION'])
+    open(t, 'wb').write(c)
 
 for file in files:
     # Guarantee that real copies of these files always exist in