Merge "Make our virtualenv source py3 safe"
This commit is contained in:
commit
a2f910d702
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
|
import runpy
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import diskimage_builder.paths
|
import diskimage_builder.paths
|
||||||
@ -32,7 +33,9 @@ def running_under_virtualenv():
|
|||||||
def activate_venv():
|
def activate_venv():
|
||||||
if running_under_virtualenv():
|
if running_under_virtualenv():
|
||||||
activate_this = os.path.join(sys.prefix, "bin", "activate_this.py")
|
activate_this = os.path.join(sys.prefix, "bin", "activate_this.py")
|
||||||
execfile(activate_this, dict(__file__=activate_this))
|
globs = runpy.run_path(activate_this, globals())
|
||||||
|
globals().update(globs)
|
||||||
|
del globs
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
Loading…
Reference in New Issue
Block a user