Use sys.executable to run python instead of hardcoded 'python'
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Sun Sep 18 16:17:55 2011 +0100 (8 months ago)
changeset 40e17133ac5523
parent 38 b794167af4f7
child 41 4e7bbcd2300a
Use sys.executable to run python instead of hardcoded 'python'
build.py
     1.1 --- a/build.py	Mon May 02 10:07:17 2011 -0700
     1.2 +++ b/build.py	Sun Sep 18 16:17:55 2011 +0100
     1.3 @@ -9,12 +9,12 @@
     1.4  
     1.5  
     1.6  def build_nsc():
     1.7 -    run_command(['python', 'scons.py'])
     1.8 +    run_command([sys.executable, 'scons.py'])
     1.9      
    1.10  
    1.11  def build_ns3(config, build_examples, build_tests):
    1.12      cmd = [
    1.13 -        "python", "waf", "configure",
    1.14 +        sys.executable, "waf", "configure",
    1.15          ]
    1.16  
    1.17      if build_examples:
    1.18 @@ -59,7 +59,7 @@
    1.19              print "Note: configuring ns-3 without NSC (architecture not supported)"
    1.20  
    1.21      run_command(cmd)
    1.22 -    run_command(["python", "waf"])
    1.23 +    run_command([sys.executable, "waf"])
    1.24  
    1.25  
    1.26  def main(argv):