old_contents: # coding: utf-8
  
  import os
  
  from setuptools import setup
  
  # Avoid polluting the .tar.gz with ._* files under Mac OS X
  os.putenv('COPYFILE_DISABLE', 'true')
  
  # Prevent distutils from complaining that a standard file wasn't found
  README = os.path.join(os.path.dirname(__file__), 'README')
  if not os.path.exists(README):
      os.symlink(README + '.rst', README)
  
  description = 'Photo gallery with granular access control'
  
  with open(README) as f:
      long_description = '\n\n'.join(f.read().split('\n\n')[2:6])
  
  setup(
      name='myks-gallery',
      version='0.5',
      author='Aymeric Augustin',
      author_email='aymeric.augustin@m4x.org',
      url='https://github.com/aaugustin/myks-gallery',
      description=description,
      long_description=long_description,
      download_url='http://pypi.python.org/pypi/myks-gallery',
      packages=[
          'gallery',
          'gallery.management',
          'gallery.management.commands',
      ],
      package_data={
          'gallery': [
              'locale/*/LC_MESSAGES/*',
              'static/css/gallery.css',
              'templates/admin/gallery/*.html',
              'templates/gallery/*.html',
          ],
      },
      classifiers=[
          "Development Status :: 4 - Beta",
          "Environment :: Web Environment",
          "Framework :: Django",
          "Intended Audience :: Developers",
          "License :: OSI Approved :: BSD License",
          "Operating System :: OS Independent",
          "Programming Language :: Python",
          "Programming Language :: Python :: 2",
          "Programming Language :: Python :: 2.7",
          "Programming Language :: Python :: 3",
          "Programming Language :: Python :: 3.2",
          "Programming Language :: Python :: 3.3",
          "Programming Language :: Python :: 3.4",
          "Programming Language :: Python :: 3.5",
      ],
      platforms='all',
      license='BSD'
  )
  
new_contents: from __future__ import unicode_literals
  
  import codecs
  import os.path
  
  import setuptools
  
  root_dir = os.path.abspath(os.path.dirname(__file__))
  
  description = "Photo gallery with granular access control"
  
  with codecs.open(os.path.join(root_dir, 'README.rst'), encoding='utf-8') as f:
      long_description = f.read()
  
  
  setuptools.setup(
      name='myks-gallery',
      version='0.5',
      description=description,
      long_description=long_description,
      url='https://github.com/aaugustin/myks-gallery',
      author='Aymeric Augustin',
      author_email='aymeric.augustin@m4x.org',
      license='BSD',
      classifiers=[
          "Development Status :: 4 - Beta",
          "Environment :: Web Environment",
          "Framework :: Django",
          "Framework :: Django :: 1.8",
          "Framework :: Django :: 1.9",
          "Framework :: Django :: 1.10",
          "Intended Audience :: Developers",
          "License :: OSI Approved :: BSD License",
          "Operating System :: OS Independent",
          "Programming Language :: Python",
          "Programming Language :: Python :: 2",
          "Programming Language :: Python :: 2.7",
          "Programming Language :: Python :: 3",
          "Programming Language :: Python :: 3.3",
          "Programming Language :: Python :: 3.4",
          "Programming Language :: Python :: 3.5",
      ],
      packages=[
          'gallery',
          'gallery.management',
          'gallery.management.commands',
      ],
      package_data={
          'gallery': [
              'locale/*/LC_MESSAGES/*',
              'static/css/gallery.css',
              'templates/admin/gallery/*.html',
              'templates/gallery/*.html',
          ],
      },
  )
  
subject: Update setup.py according to PyPA guidelines.