def virtualenv(self, virtualenv):
<EOL>if isinstance(virtualenv, bool):<EOL><INDENT>self._skip_virtualenv = virtualenv<EOL><DEDENT>else:<EOL><INDENT>self._virtualenv = virtualenv<EOL>if not os.path.isdir(self._virtualenv):<EOL><INDENT>raise Exception("<STR_LIT>" % self._virtualenv)<EOL><DEDENT>LOG.info("<STR_LIT>" % self._virtualenv)<EOL>self._pkg_venv = self._virtualenv<EOL>self._skip_virtualenv = True<EOL><DEDENT>
Sets the virtual environment for the lambda package

If this is not set then package_dependencies will create a new one.

Takes a path to a virtualenv or a boolean if the virtualenv creation
should be skipped.