summaryrefslogtreecommitdiff
path: root/ci/bootstrap.py
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2019-05-05 10:15:26 +0100
committerColin Watson <cjwatson@debian.org>2019-05-05 10:15:26 +0100
commit6ee4c027ff1501a7fe68f03ba94846ef614137b2 (patch)
tree1b8fae60f506574c30fa69620f8287fc8d3cbf4c /ci/bootstrap.py
parent163d3b08aae6a133ed6558bb4281fda9e4cf1ddd (diff)
New upstream version 1.4.0
Diffstat (limited to 'ci/bootstrap.py')
-rwxr-xr-xci/bootstrap.py7
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