code: def _get_ignore_from_manifest(filename):
      
  
      class MyTextFile(TextFile):
          def error(self, msg, line=None):  # pragma: nocover
              # (this is never called by TextFile in current versions of CPython)
              raise Failure(self.gen_error(msg, line))
  
          def warn(self, msg, line=None):
              warning(self.gen_error(msg, line))
  
      template = MyTextFile(filename,
                            strip_comments=True,
                            skip_blanks=True,
                            join_lines=True,
                            lstrip_ws=True,
                            rstrip_ws=True,
                            collapse_join=True)
      try:
          lines = template.readlines()
      finally:
          template.close()
      return _get_ignore_from_manifest_lines(lines)
docs: Gather the various ignore patterns from a MANIFEST.in.
  
      Returns a list of standard ignore patterns and a list of regular
      expressions to ignore.