Fix SConstruct to use for build commands. (Terrel Shumway)
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 3 Jul 2002 15:51:30 +0000 (15:51 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 3 Jul 2002 15:51:30 +0000 (15:51 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@401 fdb21ef1-2011-0410-befe-b5e4ea1792b1

SConstruct
src/CHANGES.txt

index 4cc591a68d5ec02611ec94ed71092da6efde53f0..9f323c03760e160c0070e427d809696f3f6e474d 100644 (file)
@@ -275,6 +275,8 @@ env = Environment(
                    UNPACK_ZIP_DIR      = unpack_zip_dir,
 
                    BUILDERS            = { 'SCons_revision' : revbuilder },
+
+                   PYTHON              = sys.executable
                  )
 
 #
@@ -589,7 +591,7 @@ for p in [ scons ]:
         env.Command(dfiles, unpack_tar_gz_files, [
             "rm -rf %s" % os.path.join(unpack_tar_gz_dir, pkg_version, 'build'),
             "rm -rf $TEST_TAR_GZ_DIR",
-            "python %s install --prefix=$TEST_TAR_GZ_DIR" % \
+            "$PYTHON %s install --prefix=$TEST_TAR_GZ_DIR" % \
                 os.path.join(unpack_tar_gz_dir, pkg_version, 'setup.py'),
         ])
 
@@ -629,7 +631,7 @@ for p in [ scons ]:
         env.Command(dfiles, unpack_zip_files, [
             "rm -rf %s" % os.path.join(unpack_zip_dir, pkg_version, 'build'),
             "rm -rf $TEST_ZIP_DIR",
-            "python %s install --prefix=$TEST_ZIP_DIR" % \
+            "$PYTHON %s install --prefix=$TEST_ZIP_DIR" % \
                 os.path.join(unpack_zip_dir, pkg_version, 'setup.py'),
         ])
 
@@ -674,7 +676,7 @@ for p in [ scons ]:
             b = env.SCons_revision(os.path.join(build, d), d)
             env.Depends(deb, b)
         env.Command(deb, build_src_files, [
-            "cd %s && fakeroot make -f debian/rules PYTHON=python BUILDDEB_OPTIONS=--destdir=../../build/dist binary" % build,
+            "cd %s && fakeroot make -f debian/rules PYTHON=$PYTHON BUILDDEB_OPTIONS=--destdir=../../build/dist binary" % build,
                     ])
 
         old = os.path.join('lib', 'scons', '')
@@ -703,12 +705,12 @@ for p in [ scons ]:
                                                    'bdist.' + platform,
                                                    'dumb'))
         for format in distutils_formats:
-            commands.append("python $SETUP_PY bdist_dumb -f %s" % format)
+            commands.append("$PYTHON $SETUP_PY bdist_dumb -f %s" % format)
 
-        commands.append("python $SETUP_PY sdist --formats=%s" %  \
+        commands.append("$PYTHON $SETUP_PY sdist --formats=%s" %  \
                             string.join(distutils_formats, ','))
 
-    commands.append("python $SETUP_PY bdist_wininst")
+    commands.append("$PYTHON $SETUP_PY bdist_wininst")
 
     env.Command(distutils_targets, build_src_files, commands)
 
@@ -834,11 +836,11 @@ if change:
                                            'scons',
                                            'build'),
                 "rm -rf $TEST_SRC_TAR_GZ_DIR",
-                "cd %s && python %s %s" % \
+                "cd %s && $PYTHON %s %s" % \
                     (os.path.join(unpack_tar_gz_dir, psv),
                      os.path.join('src', 'script', 'scons.py'),
                      os.path.join('build', 'scons')),
-                "python %s install --prefix=$TEST_SRC_TAR_GZ_DIR" % \
+                "$PYTHON %s install --prefix=$TEST_SRC_TAR_GZ_DIR" % \
                     os.path.join(unpack_tar_gz_dir,
                                  psv,
                                  'build',
@@ -884,11 +886,11 @@ if change:
                                            'scons',
                                            'build'),
                 "rm -rf $TEST_SRC_ZIP_DIR",
-                "cd %s && python %s %s" % \
+                "cd %s && $PYTHON %s %s" % \
                     (os.path.join(unpack_zip_dir, psv),
                      os.path.join('src', 'script', 'scons.py'),
                      os.path.join('build', 'scons')),
-                "python %s install --prefix=$TEST_SRC_ZIP_DIR" % \
+                "$PYTHON %s install --prefix=$TEST_SRC_ZIP_DIR" % \
                     os.path.join(unpack_zip_dir,
                                  psv,
                                  'build',
index 0054f35a00a246cf23299ca1808d32387de66d0f..335a3b512292a953e3d02022dcd53eaabd13213d 100644 (file)
@@ -126,6 +126,11 @@ RELEASE 0.08 -
   - Change the name of Update() to Replace().  Keep Update() as a
     deprecated synonym, at least for now.
 
+  From Terrel Shumway:
+
+  - Use a $PYTHON construction variable, initialized to sys.executable,
+    when using Python to build parts of the SCons packages.
+
 
 
 RELEASE 0.07 - Thu,  2 May 2002 13:37:16 -0500