def bundle_package(self, dirpath):
        """Bundle the given directory as a python package."""
        dirpath = os.path.abspath(dirpath)
        rootdir, relpath = os.path.split(dirpath)
        self._gather_package("", rootdir, relpath)
        self._perform_pending_import_analysis()
Bundle the given directory as a python package.
tools/module_bundler.py