prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  README broken on PyPI (must be reStructuredText)
  The [package description](https://pypi.python.org/pypi/pip-tools/) on PyPI is unreadable since PyPI expects the README in [reStructuredText](http://www.sphinx-doc.org/en/stable/rest.html) file format and we use MarkDown.
  
  Solution A: Convert to reST
  ---------------------
  
  1. Rename the current `README.md` to `README.rst`
  1. Replace the markdown of the badges and the code samples ([example](https://github.com/Organice/djangocms-maps/blob/master/README.rst))
  1. Add a `long_description=read_file('README.rst')` line to `setup.py` ([example](https://github.com/Organice/djangocms-maps/blob/master/setup.py#L50))
  
  Solution B: Process before Upload
  -------------------
  
  1. Integrate [pypandoc](https://pypi.python.org/pypi/pypandoc) in `setup.py` ([example](https://github.com/jrief/djangocms-cascade/blob/master/setup.py#L7-L14))
  1. Add a `long_description=convert('README.md', 'rst')` line to `setup.py` ([example](https://github.com/jrief/djangocms-cascade/blob/master/setup.py#L49))
  
  ------------
  
  Both solutions above will render a nicely formatted, HTML-styled package description on PyPI.
  
  Quality Assurance
  --------------
  
  Optionally, you may check your README with [checkdocs](https://github.com/Organice/djangocms-maps/blob/master/tox.ini#L13-L19) before uploading the package to PyPI, because sometimes the reST-to-HTML conversion that PyPI uses fails -- and renders a still hard-to-read, broken, unformatted package description.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `setup.py`
  Content:
  ```
  1 """
  2 pip-tools keeps your pinned dependencies fresh.
  3 """
  4 from setuptools import find_packages, setup
  5 
  6 setup(
  7     name='pip-tools',
  8     use_scm_version=True,
  9     url='https://github.com/jazzband/pip-tools/',
  10     license='BSD',
  11     author='Vincent Driessen',
  12     author_email='me@nvie.com',
  13     description=__doc__,
  14     packages=find_packages(exclude=['tests']),
  15     setup_requires=['setuptools_scm'],
  16     install_requires=[
  17         'click>=6',
  18         'first',
  19         'six',
  20         'setuptools'
  21     ],
  22     extras_require={
  23         ':python_version < "3.0"': ['contextlib2']
  24     },
  25     zip_safe=False,
  26     entry_points={
  27         'console_scripts': [
  28             'pip-compile = piptools.scripts.compile:cli',
  29             'pip-sync = piptools.scripts.sync:cli',
  30         ],
  31     },
  32     platforms='any',
  33     classifiers=[
  34         'Development Status :: 5 - Production/Stable',
  35         'Intended Audience :: Developers',
  36         'Intended Audience :: System Administrators',
  37         'License :: OSI Approved :: BSD License',
  38         'Operating System :: OS Independent',
  39         'Programming Language :: Python',
  40         'Programming Language :: Python :: 2',
  41         'Programming Language :: Python :: 2.7',
  42         'Programming Language :: Python :: 3',
  43         'Programming Language :: Python :: 3.4',
  44         'Programming Language :: Python :: 3.5',
  45         'Programming Language :: Python :: 3.6',
  46         'Topic :: System :: Systems Administration',
  47     ]
  48 )
  49
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -1,8 +1,14 @@
   """
   pip-tools keeps your pinned dependencies fresh.
   """
  +from os.path import abspath, dirname, join
   from setuptools import find_packages, setup
   
  +def read_file(filename):
  +    """Read the contents of a file located relative to setup.py"""
  +    with open(join(abspath(dirname(__file__)), filename)) as thefile:
  +        return thefile.read()
  +
   setup(
       name='pip-tools',
       use_scm_version=True,
  @@ -11,6 +17,7 @@
       author='Vincent Driessen',
       author_email='me@nvie.com',
       description=__doc__,
  +    long_description=read_file('README.rst'),
       packages=find_packages(exclude=['tests']),
       setup_requires=['setuptools_scm'],
       install_requires=[
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -1,8 +1,14 @@\n \"\"\"\n pip-tools keeps your pinned dependencies fresh.\n \"\"\"\n+from os.path import abspath, dirname, join\n from setuptools import find_packages, setup\n \n+def read_file(filename):\n+    \"\"\"Read the contents of a file located relative to setup.py\"\"\"\n+    with open(join(abspath(dirname(__file__)), filename)) as thefile:\n+        return thefile.read()\n+\n setup(\n     name='pip-tools',\n     use_scm_version=True,\n@@ -11,6 +17,7 @@\n     author='Vincent Driessen',\n     author_email='me@nvie.com',\n     description=__doc__,\n+    long_description=read_file('README.rst'),\n     packages=find_packages(exclude=['tests']),\n     setup_requires=['setuptools_scm'],\n     install_requires=[\n", "issue": "README broken on PyPI (must be reStructuredText)\nThe [package description](https://pypi.python.org/pypi/pip-tools/) on PyPI is unreadable since PyPI expects the README in [reStructuredText](http://www.sphinx-doc.org/en/stable/rest.html) file format and we use MarkDown.\r\n\r\nSolution A: Convert to reST\r\n---------------------\r\n\r\n1. Rename the current `README.md` to `README.rst`\r\n1. Replace the markdown of the badges and the code samples ([example](https://github.com/Organice/djangocms-maps/blob/master/README.rst))\r\n1. Add a `long_description=read_file('README.rst')` line to `setup.py` ([example](https://github.com/Organice/djangocms-maps/blob/master/setup.py#L50))\r\n\r\nSolution B: Process before Upload\r\n-------------------\r\n\r\n1. Integrate [pypandoc](https://pypi.python.org/pypi/pypandoc) in `setup.py` ([example](https://github.com/jrief/djangocms-cascade/blob/master/setup.py#L7-L14))\r\n1. Add a `long_description=convert('README.md', 'rst')` line to `setup.py` ([example](https://github.com/jrief/djangocms-cascade/blob/master/setup.py#L49))\r\n\r\n------------\r\n\r\nBoth solutions above will render a nicely formatted, HTML-styled package description on PyPI.\r\n\r\nQuality Assurance\r\n--------------\r\n\r\nOptionally, you may check your README with [checkdocs](https://github.com/Organice/djangocms-maps/blob/master/tox.ini#L13-L19) before uploading the package to PyPI, because sometimes the reST-to-HTML conversion that PyPI uses fails -- and renders a still hard-to-read, broken, unformatted package description.\n", "before_files": [{"content": "\"\"\"\npip-tools keeps your pinned dependencies fresh.\n\"\"\"\nfrom setuptools import find_packages, setup\n\nsetup(\n    name='pip-tools',\n    use_scm_version=True,\n    url='https://github.com/jazzband/pip-tools/',\n    license='BSD',\n    author='Vincent Driessen',\n    author_email='me@nvie.com',\n    description=__doc__,\n    packages=find_packages(exclude=['tests']),\n    setup_requires=['setuptools_scm'],\n    install_requires=[\n        'click>=6',\n        'first',\n        'six',\n        'setuptools'\n    ],\n    extras_require={\n        ':python_version < \"3.0\"': ['contextlib2']\n    },\n    zip_safe=False,\n    entry_points={\n        'console_scripts': [\n            'pip-compile = piptools.scripts.compile:cli',\n            'pip-sync = piptools.scripts.sync:cli',\n        ],\n    },\n    platforms='any',\n    classifiers=[\n        'Development Status :: 5 - Production/Stable',\n        'Intended Audience :: Developers',\n        'Intended Audience :: System Administrators',\n        'License :: OSI Approved :: BSD License',\n        'Operating System :: OS Independent',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Topic :: System :: Systems Administration',\n    ]\n)\n", "path": "setup.py"}], "after_files": [{"content": "\"\"\"\npip-tools keeps your pinned dependencies fresh.\n\"\"\"\nfrom os.path import abspath, dirname, join\nfrom setuptools import find_packages, setup\n\ndef read_file(filename):\n    \"\"\"Read the contents of a file located relative to setup.py\"\"\"\n    with open(join(abspath(dirname(__file__)), filename)) as thefile:\n        return thefile.read()\n\nsetup(\n    name='pip-tools',\n    use_scm_version=True,\n    url='https://github.com/jazzband/pip-tools/',\n    license='BSD',\n    author='Vincent Driessen',\n    author_email='me@nvie.com',\n    description=__doc__,\n    long_description=read_file('README.rst'),\n    packages=find_packages(exclude=['tests']),\n    setup_requires=['setuptools_scm'],\n    install_requires=[\n        'click>=6',\n        'first',\n        'six',\n        'setuptools'\n    ],\n    extras_require={\n        ':python_version < \"3.0\"': ['contextlib2']\n    },\n    zip_safe=False,\n    entry_points={\n        'console_scripts': [\n            'pip-compile = piptools.scripts.compile:cli',\n            'pip-sync = piptools.scripts.sync:cli',\n        ],\n    },\n    platforms='any',\n    classifiers=[\n        'Development Status :: 5 - Production/Stable',\n        'Intended Audience :: Developers',\n        'Intended Audience :: System Administrators',\n        'License :: OSI Approved :: BSD License',\n        'Operating System :: OS Independent',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Topic :: System :: Systems Administration',\n    ]\n)\n", "path": "setup.py"}]}