diff options
Diffstat (limited to 'ci/bootstrap.py')
-rwxr-xr-x | ci/bootstrap.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ci/bootstrap.py b/ci/bootstrap.py index e5292aa..e64a6c0 100755 --- a/ci/bootstrap.py +++ b/ci/bootstrap.py @@ -28,9 +28,10 @@ if __name__ == "__main__": subprocess.check_call([sys.executable, "-m", "virtualenv", env_path]) print("Installing `jinja2` into bootstrap environment...") subprocess.check_call([join(bin_path, "pip"), "install", "jinja2"]) - activate = join(bin_path, "activate_this.py") - # noinspection PyCompatibility - exec(compile(open(activate, "rb").read(), activate, "exec"), dict(__file__=activate)) + python_executable = join(bin_path, "python") + if not os.path.samefile(python_executable, sys.executable): + print("Re-executing with: {0}".format(python_executable)) + os.execv(python_executable, [python_executable, __file__]) import jinja2 |