class_docstr: Smart sdist that finds anything supported by revision control
class_docstr_tok: ["Smart","sdist","that","finds","anything","supported","by","revision","control"]
docstr: Checks if license_file' or 'license_files' is configured and adds any
  valid paths to 'self.filelist'.
docstr_tok: ["Checks","if","license_file","'","or","'license_files","'","is","configured","and","adds","any","valid","paths","to","'self.filelist","'","."]
code: def check_license(self):
      """Checks if license_file' or 'license_files' is configured and adds any
      valid paths to 'self.filelist'.
      """
  
      files = ordered_set.OrderedSet()
  
      opts = self.distribution.get_option_dict("metadata")
  
      # ignore the source of the value
      _, license_file = opts.get("license_file", (None, None))
  
      if license_file is None:
          log.debug("'license_file' option was not specified")
      else:
          files.add(license_file)
  
      try:
          files.update(self.distribution.metadata.license_files)
      except TypeError:
          log.warn("warning: 'license_files' option is malformed")
  
      for f in files:
          if not os.path.exists(f):
              log.warn(
                  "warning: Failed to find the configured license file '%s'",
                  f,
              )
              files.remove(f)
  
      self.filelist.extend(files)
  
imports: from distutils import log
  import distutils.command.sdist
  import os
  import sys
  import io
  import contextlib
  from setuptools.extern import six, ordered_set
  from .py36compat import sdist_add_defaults
  import pkg_resources
label_desc: Use image node_id 16 for calling the sdist obj's underlying member method code with example usage: obj.check_license() without return types