Browse Source

Update both setup.py

Rob Figueiredo 12 years ago
parent
commit
54dc3dc2bb
2 changed files with 18 additions and 14 deletions
  1. 9 7
      revel-jet/setup.py
  2. 9 7
      revel-qbs/setup.py

+ 9 - 7
revel-jet/setup.py

@@ -4,18 +4,20 @@ import os
 import setup_util
 import time
 
+CWD = 'revel-jet'
+
 def start(args):
   setup_util.replace_text("revel/src/benchmark/conf/app.conf", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)")
   if os.name == 'nt':
     env = os.environ.copy()
-    env["GOPATH"] = r"C:\FrameworkBenchmarks\revel"
-    subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd="revel", env=env)
-    subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd="revel", env=env)
-    subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd="revel", env=env)
+    env["GOPATH"] = "C:\\FrameworkBenchmarks\\" + CWD
+    subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd=CWD, env=env)
+    subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd=CWD, env=env)
+    subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd=CWD, env=env)
     return 0
-  subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd="revel")
-  subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd="revel")
-  subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd="revel")
+  subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd=CWD)
+  subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd=CWD)
+  subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd=CWD)
   return 0
 
 def stop():

+ 9 - 7
revel-qbs/setup.py

@@ -4,18 +4,20 @@ import os
 import setup_util
 import time
 
+CWD = 'revel-qbs'
+
 def start(args):
   setup_util.replace_text("revel/src/benchmark/conf/app.conf", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)")
   if os.name == 'nt':
     env = os.environ.copy()
-    env["GOPATH"] = r"C:\FrameworkBenchmarks\revel"
-    subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd="revel", env=env)
-    subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd="revel", env=env)
-    subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd="revel", env=env)
+    env["GOPATH"] = "C:\\FrameworkBenchmarks\\" + CWD
+    subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd=CWD, env=env)
+    subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd=CWD, env=env)
+    subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd=CWD, env=env)
     return 0
-  subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd="revel")
-  subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd="revel")
-  subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd="revel")
+  subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd=CWD)
+  subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd=CWD)
+  subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd=CWD)
   return 0
 
 def stop():