def package(self, ignore=None):
ignore = ignore or []<EOL>package = os.path.join(self._temp_workspace, '<STR_LIT>')<EOL>LOG.info('<STR_LIT>')<EOL>if hasattr(self, '<STR_LIT>') and self._pkg_venv:<EOL><INDENT>lib_dir = '<STR_LIT>'<EOL>lib64_dir = '<STR_LIT>'<EOL>if sys.platform == '<STR_LIT:win32>' or sys.platform == '<STR_LIT>':<EOL><INDENT>lib_dir = '<STR_LIT>'<EOL>lib64_dir = '<STR_LIT>'<EOL><DEDENT>lib_site_list = glob.glob(os.path.join(<EOL>self._pkg_venv, lib_dir))<EOL>if lib_site_list:<EOL><INDENT>utils.copy_tree(lib_site_list[<NUM_LIT:0>], package)<EOL><DEDENT>else:<EOL><INDENT>LOG.debug("<STR_LIT>")<EOL><DEDENT>lib64_site_list = glob.glob(os.path.join(<EOL>self._pkg_venv, lib64_dir))<EOL>if lib64_site_list:<EOL><INDENT>lib64_site_packages = lib64_site_list[<NUM_LIT:0>]<EOL>if not os.path.islink(lib64_site_packages):<EOL><INDENT>LOG.info('<STR_LIT>')<EOL>utils.copy_tree(lib64_site_packages, package)<EOL><DEDENT>lib64_site_packages = lib64_site_list[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>LOG.debug("<STR_LIT>")<EOL><DEDENT><DEDENT>ignore.append(r"<STR_LIT>" % re.escape(TEMP_WORKSPACE_NAME))<EOL>utils.copy_tree(self._path, package, ignore)<EOL>for p in self._extra_files:<EOL><INDENT>LOG.info('<STR_LIT>' % p)<EOL>ignore.append(re.escape(p))<EOL>if os.path.isdir(p):<EOL><INDENT>utils.copy_tree(p, package, ignore=ignore, include_parent=True)<EOL><DEDENT>else:<EOL><INDENT>shutil.copy(p, package)<EOL><DEDENT><DEDENT>self._create_zip(package)<EOL>
Create a zip file of the lambda script and its dependencies.

:param list ignore: a list of regular expression strings to match paths
    of files in the source of the lambda script against and ignore
    those files when creating the zip file. The paths to be matched are
    local to the source root.