prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  3.0.3 Release Broken
  It appears that the archive uploaded to PyPI does not include README.md, which is referred to by setup.py.
  
  @Idolf can you update the release to include the README?
  
  
  --- 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 #!/usr/bin/env python2
  2 import glob
  3 import os
  4 import platform
  5 import sys
  6 from distutils.command.install import INSTALL_SCHEMES
  7 from distutils.sysconfig import get_python_inc
  8 from distutils.util import convert_path
  9 
  10 from setuptools import find_packages
  11 from setuptools import setup
  12 
  13 # Get all template files
  14 templates = []
  15 for dirpath, dirnames, filenames in os.walk(convert_path('pwnlib/shellcraft/templates')):
  16     for f in filenames:
  17         templates.append(os.path.relpath(os.path.join(dirpath, f), 'pwnlib'))
  18 
  19 # This makes pwntools-LICENSE.txt appear with the package folders
  20 for scheme in INSTALL_SCHEMES.values():
  21     scheme['data'] = scheme['purelib']
  22 
  23 # Find all of the console scripts
  24 console_scripts = []
  25 
  26 for filename in glob.glob('pwnlib/commandline/*'):
  27     filename = os.path.basename(filename)
  28     filename, ext = os.path.splitext(filename)
  29 
  30     if ext != '.py' or '__init__' in filename:
  31         continue
  32 
  33     script = '%s=pwnlib.commandline.%s:main' % (filename, filename)
  34     console_scripts.append(script)
  35 
  36 install_requires     = ['paramiko>=1.15.2',
  37                         'mako>=1.0.0',
  38                         'pyelftools>=0.2.4',
  39                         'capstone',
  40                         'ropgadget>=5.3',
  41                         'pyserial>=2.7',
  42                         'requests>=2.0',
  43                         'pip>=6.0.8',
  44                         'tox>=1.8.1',
  45                         'pygments>=2.0',
  46                         'pysocks',
  47                         'python-dateutil',
  48                         'pypandoc',
  49                         'packaging']
  50 
  51 # This is a hack until somebody ports psutil to OpenBSD
  52 if platform.system() != 'OpenBSD':
  53     install_requires.append('psutil>=2.1.3')
  54 
  55 # Check that the user has installed the Python development headers
  56 PythonH = os.path.join(get_python_inc(), 'Python.h')
  57 if not os.path.exists(PythonH):
  58     print >> sys.stderr, "You must install the Python development headers!"
  59     print >> sys.stderr, "$ apt-get install python-dev"
  60     sys.exit(-1)
  61 
  62 # Convert README.md to reStructuredText for PyPI
  63 long_description = ''
  64 try:
  65     import pypandoc
  66     try:
  67         pypandoc.get_pandoc_path()
  68     except OSError:
  69         pypandoc.download_pandoc()
  70     long_description = pypandoc.convert_file('README.md', 'rst')
  71 except ImportError:
  72     pass
  73 
  74 
  75 setup(
  76     name                 = 'pwntools',
  77     packages             = find_packages(),
  78     version              = '3.0.3',
  79     data_files           = [('',
  80                              ['LICENSE-pwntools.txt',
  81                              ]),
  82                             ],
  83     package_data         = {
  84         'pwnlib': [
  85             'data/crcsums.txt',
  86             'data/useragents/useragents.txt',
  87             'data/binutils/*',
  88             'data/includes/*.h',
  89             'data/includes/*/*.h',
  90         ] + templates,
  91     },
  92     entry_points = {'console_scripts': console_scripts},
  93     scripts              = glob.glob("bin/*"),
  94     description          = "Pwntools CTF framework and exploit development library.",
  95     long_description     = long_description,
  96     author               = "Gallopsled et al.",
  97     author_email         = "#pwntools @ freenode.net",
  98     url                  = 'https://pwntools.com',
  99     download_url         = "https://github.com/Gallopsled/pwntools/releases",
  100     install_requires     = install_requires,
  101     license              = "Mostly MIT, some GPL/BSD, see LICENSE-pwntools.txt",
  102     keywords             = 'pwntools exploit ctf capture the flag binary wargame overflow stack heap defcon',
  103     classifiers          = [
  104         'Development Status :: 5 - Production/Stable',
  105         'Environment :: Console',
  106         'Intended Audience :: Developers',
  107         'Intended Audience :: Science/Research',
  108         'Intended Audience :: System Administrators',
  109         'License :: OSI Approved :: MIT License',
  110         'Natural Language :: English',
  111         'Operating System :: POSIX :: Linux',
  112         'Programming Language :: Python :: 2.7',
  113         'Topic :: Security',
  114         'Topic :: Software Development :: Assemblers',
  115         'Topic :: Software Development :: Debuggers',
  116         'Topic :: Software Development :: Disassemblers',
  117         'Topic :: Software Development :: Embedded Systems',
  118         'Topic :: Software Development :: Libraries :: Python Modules',
  119         'Topic :: System :: System Shells',
  120         'Topic :: Utilities',
  121     ]
  122 )
  123
  ```
  --- 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
  @@ -77,8 +77,7 @@
       packages             = find_packages(),
       version              = '3.0.3',
       data_files           = [('',
  -                             ['LICENSE-pwntools.txt',
  -                             ]),
  +                             glob.glob('*.md') + glob.glob('*.txt')),
                               ],
       package_data         = {
           'pwnlib': [
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -77,8 +77,7 @@\n     packages             = find_packages(),\n     version              = '3.0.3',\n     data_files           = [('',\n-                             ['LICENSE-pwntools.txt',\n-                             ]),\n+                             glob.glob('*.md') + glob.glob('*.txt')),\n                             ],\n     package_data         = {\n         'pwnlib': [\n", "issue": "3.0.3 Release Broken\nIt appears that the archive uploaded to PyPI does not include README.md, which is referred to by setup.py.\n\n@Idolf can you update the release to include the README?\n\n", "before_files": [{"content": "#!/usr/bin/env python2\nimport glob\nimport os\nimport platform\nimport sys\nfrom distutils.command.install import INSTALL_SCHEMES\nfrom distutils.sysconfig import get_python_inc\nfrom distutils.util import convert_path\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n# Get all template files\ntemplates = []\nfor dirpath, dirnames, filenames in os.walk(convert_path('pwnlib/shellcraft/templates')):\n    for f in filenames:\n        templates.append(os.path.relpath(os.path.join(dirpath, f), 'pwnlib'))\n\n# This makes pwntools-LICENSE.txt appear with the package folders\nfor scheme in INSTALL_SCHEMES.values():\n    scheme['data'] = scheme['purelib']\n\n# Find all of the console scripts\nconsole_scripts = []\n\nfor filename in glob.glob('pwnlib/commandline/*'):\n    filename = os.path.basename(filename)\n    filename, ext = os.path.splitext(filename)\n\n    if ext != '.py' or '__init__' in filename:\n        continue\n\n    script = '%s=pwnlib.commandline.%s:main' % (filename, filename)\n    console_scripts.append(script)\n\ninstall_requires     = ['paramiko>=1.15.2',\n                        'mako>=1.0.0',\n                        'pyelftools>=0.2.4',\n                        'capstone',\n                        'ropgadget>=5.3',\n                        'pyserial>=2.7',\n                        'requests>=2.0',\n                        'pip>=6.0.8',\n                        'tox>=1.8.1',\n                        'pygments>=2.0',\n                        'pysocks',\n                        'python-dateutil',\n                        'pypandoc',\n                        'packaging']\n\n# This is a hack until somebody ports psutil to OpenBSD\nif platform.system() != 'OpenBSD':\n    install_requires.append('psutil>=2.1.3')\n\n# Check that the user has installed the Python development headers\nPythonH = os.path.join(get_python_inc(), 'Python.h')\nif not os.path.exists(PythonH):\n    print >> sys.stderr, \"You must install the Python development headers!\"\n    print >> sys.stderr, \"$ apt-get install python-dev\"\n    sys.exit(-1)\n\n# Convert README.md to reStructuredText for PyPI\nlong_description = ''\ntry:\n    import pypandoc\n    try:\n        pypandoc.get_pandoc_path()\n    except OSError:\n        pypandoc.download_pandoc()\n    long_description = pypandoc.convert_file('README.md', 'rst')\nexcept ImportError:\n    pass\n\n\nsetup(\n    name                 = 'pwntools',\n    packages             = find_packages(),\n    version              = '3.0.3',\n    data_files           = [('',\n                             ['LICENSE-pwntools.txt',\n                             ]),\n                            ],\n    package_data         = {\n        'pwnlib': [\n            'data/crcsums.txt',\n            'data/useragents/useragents.txt',\n            'data/binutils/*',\n            'data/includes/*.h',\n            'data/includes/*/*.h',\n        ] + templates,\n    },\n    entry_points = {'console_scripts': console_scripts},\n    scripts              = glob.glob(\"bin/*\"),\n    description          = \"Pwntools CTF framework and exploit development library.\",\n    long_description     = long_description,\n    author               = \"Gallopsled et al.\",\n    author_email         = \"#pwntools @ freenode.net\",\n    url                  = 'https://pwntools.com',\n    download_url         = \"https://github.com/Gallopsled/pwntools/releases\",\n    install_requires     = install_requires,\n    license              = \"Mostly MIT, some GPL/BSD, see LICENSE-pwntools.txt\",\n    keywords             = 'pwntools exploit ctf capture the flag binary wargame overflow stack heap defcon',\n    classifiers          = [\n        'Development Status :: 5 - Production/Stable',\n        'Environment :: Console',\n        'Intended Audience :: Developers',\n        'Intended Audience :: Science/Research',\n        'Intended Audience :: System Administrators',\n        'License :: OSI Approved :: MIT License',\n        'Natural Language :: English',\n        'Operating System :: POSIX :: Linux',\n        'Programming Language :: Python :: 2.7',\n        'Topic :: Security',\n        'Topic :: Software Development :: Assemblers',\n        'Topic :: Software Development :: Debuggers',\n        'Topic :: Software Development :: Disassemblers',\n        'Topic :: Software Development :: Embedded Systems',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n        'Topic :: System :: System Shells',\n        'Topic :: Utilities',\n    ]\n)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python2\nimport glob\nimport os\nimport platform\nimport sys\nfrom distutils.command.install import INSTALL_SCHEMES\nfrom distutils.sysconfig import get_python_inc\nfrom distutils.util import convert_path\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n# Get all template files\ntemplates = []\nfor dirpath, dirnames, filenames in os.walk(convert_path('pwnlib/shellcraft/templates')):\n    for f in filenames:\n        templates.append(os.path.relpath(os.path.join(dirpath, f), 'pwnlib'))\n\n# This makes pwntools-LICENSE.txt appear with the package folders\nfor scheme in INSTALL_SCHEMES.values():\n    scheme['data'] = scheme['purelib']\n\n# Find all of the console scripts\nconsole_scripts = []\n\nfor filename in glob.glob('pwnlib/commandline/*'):\n    filename = os.path.basename(filename)\n    filename, ext = os.path.splitext(filename)\n\n    if ext != '.py' or '__init__' in filename:\n        continue\n\n    script = '%s=pwnlib.commandline.%s:main' % (filename, filename)\n    console_scripts.append(script)\n\ninstall_requires     = ['paramiko>=1.15.2',\n                        'mako>=1.0.0',\n                        'pyelftools>=0.2.4',\n                        'capstone',\n                        'ropgadget>=5.3',\n                        'pyserial>=2.7',\n                        'requests>=2.0',\n                        'pip>=6.0.8',\n                        'tox>=1.8.1',\n                        'pygments>=2.0',\n                        'pysocks',\n                        'python-dateutil',\n                        'pypandoc',\n                        'packaging']\n\n# This is a hack until somebody ports psutil to OpenBSD\nif platform.system() != 'OpenBSD':\n    install_requires.append('psutil>=2.1.3')\n\n# Check that the user has installed the Python development headers\nPythonH = os.path.join(get_python_inc(), 'Python.h')\nif not os.path.exists(PythonH):\n    print >> sys.stderr, \"You must install the Python development headers!\"\n    print >> sys.stderr, \"$ apt-get install python-dev\"\n    sys.exit(-1)\n\n# Convert README.md to reStructuredText for PyPI\nlong_description = ''\ntry:\n    import pypandoc\n    try:\n        pypandoc.get_pandoc_path()\n    except OSError:\n        pypandoc.download_pandoc()\n    long_description = pypandoc.convert_file('README.md', 'rst')\nexcept ImportError:\n    pass\n\n\nsetup(\n    name                 = 'pwntools',\n    packages             = find_packages(),\n    version              = '3.0.3',\n    data_files           = [('',\n                             glob.glob('*.md') + glob.glob('*.txt')),\n                            ],\n    package_data         = {\n        'pwnlib': [\n            'data/crcsums.txt',\n            'data/useragents/useragents.txt',\n            'data/binutils/*',\n            'data/includes/*.h',\n            'data/includes/*/*.h',\n        ] + templates,\n    },\n    entry_points = {'console_scripts': console_scripts},\n    scripts              = glob.glob(\"bin/*\"),\n    description          = \"Pwntools CTF framework and exploit development library.\",\n    long_description     = long_description,\n    author               = \"Gallopsled et al.\",\n    author_email         = \"#pwntools @ freenode.net\",\n    url                  = 'https://pwntools.com',\n    download_url         = \"https://github.com/Gallopsled/pwntools/releases\",\n    install_requires     = install_requires,\n    license              = \"Mostly MIT, some GPL/BSD, see LICENSE-pwntools.txt\",\n    keywords             = 'pwntools exploit ctf capture the flag binary wargame overflow stack heap defcon',\n    classifiers          = [\n        'Development Status :: 5 - Production/Stable',\n        'Environment :: Console',\n        'Intended Audience :: Developers',\n        'Intended Audience :: Science/Research',\n        'Intended Audience :: System Administrators',\n        'License :: OSI Approved :: MIT License',\n        'Natural Language :: English',\n        'Operating System :: POSIX :: Linux',\n        'Programming Language :: Python :: 2.7',\n        'Topic :: Security',\n        'Topic :: Software Development :: Assemblers',\n        'Topic :: Software Development :: Debuggers',\n        'Topic :: Software Development :: Disassemblers',\n        'Topic :: Software Development :: Embedded Systems',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n        'Topic :: System :: System Shells',\n        'Topic :: Utilities',\n    ]\n)\n", "path": "setup.py"}]}