From: Yaroslav Halchenko <debian@onerussian.com>
Subject: Test scripts with exactly the same interpreter

Otherwise, for some reason, leads to segfaults on 32bit Debian and older
Ubuntus whenever e.g. testing with pyhon2.6 while default python (launched by
scripts shebangs) is python2.7

Origin: Debian
Last-Update: 2013-04-15

--- a/dipy/tests/test_scripts.py
+++ b/dipy/tests/test_scripts.py
@@ -45,7 +45,7 @@ def run_command(cmd, check_code=True):
         cmd = "%s %s" % (sys.executable, pjoin(LOCAL_SCRIPT_DIR, cmd))
     if DEBUG_PRINT:
         print("Running command '%s'" % cmd)
-    proc = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=USE_SHELL)
+    proc = Popen("%s %s" % (sys.executable, cmd), stdout=PIPE, stderr=PIPE, shell=USE_SHELL)
     stdout, stderr = proc.communicate()
     if proc.poll() == None:
         proc.terminate()
