@classmethod<EOL><INDENT>def build_includes(cls, include_packages):<DEDENT>
includes, package_root_paths = cls._split_packages(include_packages)<EOL>for package_path, package_name in six.iteritems(package_root_paths):<EOL><INDENT>includes.add(package_name)<EOL>if re.search(r'<STR_LIT>', package_path):<EOL><INDENT>package_modules = set()<EOL>for root, dirs, files in os.walk(os.path.dirname(package_path)):<EOL><INDENT>if '<STR_LIT>' in files:<EOL><INDENT>package_modules.add(root)<EOL>for module in [f for f in files if f != u"<STR_LIT>" and f.endswith('<STR_LIT>')]:<EOL><INDENT>package_modules.add(os.path.join(root, module))<EOL><DEDENT><DEDENT><DEDENT>common_prefix = os.path.commonprefix(package_modules)<EOL>common_dir = os.path.dirname(common_prefix)<EOL>package_tails = set([f[len(common_dir) + len(os.sep):] for f in package_modules])<EOL>package_names = set([os.path.splitext(tail)[<NUM_LIT:0>].replace(os.sep, '<STR_LIT:.>') for tail in package_tails])<EOL>includes |= package_names<EOL><DEDENT><DEDENT>return includes<EOL>
cx_freeze doesn't support the star (*) method of sub-module inclusion, so all submodules must be included
explicitly.

Example (From SaltStack 2014.7):

    salt
    salt.fileserver
    salt.fileserver.gitfs
    salt.fileserver.hgfs
    salt.fileserver.minionfs
    salt.fileserver.roots
    etc...

:param include_packages: List of package references to recurse for subpackages