Source

SCons / test / CPPFLAGS.py

Diff from to

File test/CPPFLAGS.py

 import sys
 import TestSCons
 
-python = TestSCons.python
+_python_ = TestSCons._python_
 _exe   = TestSCons._exe
 _obj   = TestSCons._obj
 _shobj = TestSCons._shobj
 
 test.write('SConstruct', """
 env = Environment(CPPFLAGS = '-x',
-                  LINK = r'%s mylink.py',
+                  LINK = r'%(_python_)s mylink.py',
                   LINKFLAGS = [],
-                  CC = r'%s mygcc.py cc',
-                  CXX = r'%s mygcc.py c++',
+                  CC = r'%(_python_)s mygcc.py cc',
+                  CXX = r'%(_python_)s mygcc.py c++',
                   CXXFLAGS = [],
-                  FORTRAN = r'%s mygcc.py g77')
+                  FORTRAN = r'%(_python_)s mygcc.py g77')
 env.Program(target = 'foo', source = Split('test1.c test2.cpp test3.F'))
-""" % (python, python, python, python))
+""" % locals())
 
 test.write('test1.c', r"""test1.c
 #cc
 
 test.write('SConstruct', """
 env = Environment(CPPFLAGS = '-x',
-                  SHLINK = r'%s mylink.py',
+                  SHLINK = r'%(_python_)s mylink.py',
                   SHLINKFLAGS = [],
-                  CC = r'%s mygcc.py cc',
-                  CXX = r'%s mygcc.py c++',
+                  CC = r'%(_python_)s mygcc.py cc',
+                  CXX = r'%(_python_)s mygcc.py c++',
                   CXXFLAGS = [],
-                  FORTRAN = r'%s mygcc.py g77')
+                  FORTRAN = r'%(_python_)s mygcc.py g77')
 env.SharedLibrary(target = File('foo.bar'),
                   source = Split('test1.c test2.cpp test3.F'))
-""" % (python, python, python, python))
+""" % locals())
 
 test.write('test1.c', r"""test1.c
 #cc