      init_py = open(os.path.join(package, '__init__.py')).read()
      return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
  
  
  def get_packages(package):
      """
      Return root package and all sub-packages.
      """
      return [dirpath
              for dirpath, dirnames, filenames in os.walk(package)
              if os.path.exists(os.path.join(dirpath, '__init__.py'))]
  
  
  def get_package_data(package):
      """
      Return all files under the root package, that are not in a
      package themselves.
      """
      walk = [(dirpath.replace(package + os.sep, '', 1), filenames)
              for dirpath, dirnames, filenames in os.walk(package)
              if not os.path.exists(os.path.join(dirpath, '__init__.py'))]
  
      filepaths = []
      for base, filenames in walk:
          filepaths.extend([os.path.join(base, filename)
                            for filename in filenames])
      return {package: filepaths}
  
  
  version = get_version('rest_framework')
  
  
  if sys.argv[-1] == 'publish':
      try:
 
</s> remove     packages=get_packages('rest_framework'),
    package_data=get_package_data('rest_framework'),
 </s> add     packages=find_packages(exclude=['tests*']),
    include_package_data=True, </s> remove from setuptools import setup
 </s> add from setuptools import setup, find_packages </s> remove recursive-include rest_framework/templates *.html
 </s> add recursive-include rest_framework/templates *.html schema.js
      init_py = open(os.path.join(package, '__init__.py')).read()
      return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
  
  

























  version = get_version('rest_framework')
  
  
  if sys.argv[-1] == 'publish':
      try:
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Fix packaging (#5624)

* Packaging should use manifest

* Add schema.js template to MANIFEST 
setup.py