From 5c88833385dd2572cc1fe09a684f4de9eb330bc8 Mon Sep 17 00:00:00 2001
From: Will Hawkins <whh8b@virginia.edu>
Date: Wed, 24 Feb 2021 22:31:41 -0500
Subject: [PATCH] Update scons files in the base repo to accommodate Python v3.

---
 SConscript           | 4 ++--
 SConstruct           | 8 ++++----
 irdb-libs/SConscript | 8 ++++----
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/SConscript b/SConscript
index 65f9d965e..a9066ef0a 100644
--- a/SConscript
+++ b/SConscript
@@ -29,7 +29,7 @@ libsmpsa=     SConscript("SMPStaticAnalyzer/SConscript")
 libirdbdeep=SConscript("irdb-libs/SConscript.deep")
 Depends(libirdbdeep,libsmpsa)
 
-print "Zipr install is "+env['ZIPR_INSTALL']
+print("Zipr install is "+env['ZIPR_INSTALL'])
 Export('env')
 
 
@@ -69,7 +69,7 @@ if env.GetOption('clean') and os.path.isfile("manifest.txt.config"):
 
 	# if [[ $(head -1 manifest.txt.config) == $PS_INSTALL ]] ; then
 	if str(first_line) == str(os.environ['PS_INSTALL']):
-		print "Doing pedi clean as I'm the pedi root"
+		print("Doing pedi clean as I'm the pedi root")
 		os.system( "pwd; $PEDI_HOME/pedi -c -m manifest.txt " )
 		shutil.rmtree(os.environ['PS_INSTALL'])
 
diff --git a/SConstruct b/SConstruct
index 1c04dad64..ab0e29eac 100644
--- a/SConstruct
+++ b/SConstruct
@@ -22,13 +22,13 @@ env.Replace(ZIPR_INSTALL=os.environ['ZIPR_INSTALL'])
 
 
 if int(env['debug']) == 1:
-        print "Setting debug mode"
+        print("Setting debug mode")
         env.Append(CFLAGS="      -g ")
         env.Append(CXXFLAGS="    -g ")
-	env.Append(LINKFLAGS="   -g ")
-	env.Append(SHLINKFLAGS=" -g ")
+        env.Append(LINKFLAGS="   -g ")
+        env.Append(SHLINKFLAGS=" -g ")
 else:
-        print "Setting release mode"
+        print("Setting release mode")
         env.Append(CFLAGS="      -O ")
         env.Append(CXXFLAGS="    -O ")
         env.Append(LINKFLAGS="   -O  ")
diff --git a/irdb-libs/SConscript b/irdb-libs/SConscript
index 1cc8a80ff..9d185d7d5 100644
--- a/irdb-libs/SConscript
+++ b/irdb-libs/SConscript
@@ -7,8 +7,8 @@ Import('env')
 
 if env.GetOption('clean'):
     if os.path.exists(os.environ['SECURITY_TRANSFORMS_HOME']+"/include/targ-config.h"):
-        print 'Removing include/targ-config.h'
-    	os.remove(os.environ['SECURITY_TRANSFORMS_HOME']+"/include/targ-config.h")
+        print('Removing include/targ-config.h')
+        os.remove(os.environ['SECURITY_TRANSFORMS_HOME']+"/include/targ-config.h")
     os.chdir(os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/capstone")
     os.system("make clean")
     os.chdir(os.environ['SECURITY_TRANSFORMS_HOME'])
@@ -20,11 +20,11 @@ if env.GetOption('clean'):
 else:
 
     os.chdir(os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/capstone")
-    print "Rebuilding libcapstone."
+    print("Rebuilding libcapstone.")
     jobs=env.GetOption('num_jobs')
     os.system("make -j "+str(jobs))
     os.chdir(os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/keystone")
-    print "Rebuilding libkeystone."
+    print("Rebuilding libkeystone.")
     os.chdir(os.environ['SECURITY_TRANSFORMS_HOME']+"/third_party/keystone")
     os.system("mkdir -p ./build")
     os.chdir("build")
-- 
GitLab