class_docstr: Enhanced 'build_py' command that includes data files with packages
  
  The data files are specified via a 'package_data' argument to 'setup()'.
  See 'setuptools.dist.Distribution' for more details.
  
  Also, this version of the 'build_py' command allows you to specify both
  'py_modules' and 'packages' in the same setup operation.
class_docstr_tok: ["Enhanced","'build_py","'","command","that","includes","data","files","with","packages","The","data","files","are","specified","via","a","'package_data","'","argument","to","'setup","(",")","'",".","See","'setuptools.dist.Distribution","'","for","more","details",".","Also",",","this","version","of","the","'build_py","'","command","allows","you","to","specify","both","'py_modules","'","and","'packages","'","in","the","same","setup","operation","."]
docstr: Filter filenames for package's data files in 'src_dir'
docstr_tok: ["Filter","filenames","for","package","'s","data","files","in","'src_dir","'"]
code: def exclude_data_files(self, package, src_dir, files):
      """Filter filenames for package's data files in 'src_dir'"""
      files = list(files)
      patterns = self._get_platform_patterns(
          self.exclude_package_data,
          package,
          src_dir,
      )
      match_groups = (
          fnmatch.filter(files, pattern) for pattern in patterns
      )
      # flatten the groups of matches into an iterable of matches
      matches = itertools.chain.from_iterable(match_groups)
      bad = set(matches)
      keepers = (fn for fn in files if fn not in bad)
      # ditch dupes
      return list(unique_everseen(keepers))
  
imports: from functools import partial
  from glob import glob
  from distutils.util import convert_path
  import distutils.command.build_py
  import os
  import fnmatch
  import textwrap
  import distutils.errors
  import itertools
  import stat
  from pathlib import Path
  from typing import Dict, Iterable, Iterator, List, Optional, Tuple
  from ..extern.more_itertools import unique_everseen
  from ..warnings import SetuptoolsDeprecationWarning
label_desc: Use image node_id 21 for calling the build_py obj's underlying member method code with example usage: obj.exclude_data_files(package, src_dir, files) and returns: list