def _build_new_virtualenv(self):
if self._virtualenv is None:<EOL><INDENT>self._pkg_venv = os.path.join(self._temp_workspace, '<STR_LIT>')<EOL>self._venv_pip = '<STR_LIT>'<EOL>if sys.platform == '<STR_LIT:win32>' or sys.platform == '<STR_LIT>':<EOL><INDENT>self._venv_pip = '<STR_LIT>'<EOL><DEDENT>python_exe = self._python_executable()<EOL>proc = Popen(["<STR_LIT>", "<STR_LIT>", python_exe,<EOL>self._pkg_venv], stdout=PIPE, stderr=PIPE)<EOL>stdout, stderr = proc.communicate()<EOL>LOG.debug("<STR_LIT>" % stdout)<EOL>LOG.debug("<STR_LIT>" % stderr)<EOL>if proc.returncode is not <NUM_LIT:0>:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>
Build a new virtualenvironment if self._virtualenv is set to None