prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  [Build] QA warning about codespell_lib.tests being installed as data
  While packaging v2.2.0 for Gentoo Linux, I got a QA notice about this:
  
  ```
  * QA Notice: setuptools warnings detected:
   * 
   *          Installing 'codespell_lib.tests' as data is deprecated, please list it in `packages`.
  ```
  
  The actual setuptools warning is as (here shown for Python 3.11, but same for 3.10)
  
  ```
  /usr/lib/python3.11/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Instal
  ling 'codespell_lib.tests' as data is deprecated, please list it in `packages`.
      !!
  
  
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'codespell_lib.tests' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
  
      'codespell_lib.tests' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
  
      Please make sure that 'codespell_lib.tests' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
  
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
  
  
  !!
  
    check.warn(importable)
  ```
  
  Find attached the full build log.
  [codespell-2.2.0:20220818-083735.log](https://github.com/codespell-project/codespell/files/9371941/codespell-2.2.0.20220818-083735.log)
  
  
  --- 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 python
  2 
  3 # adapted from mne-python
  4 
  5 import os
  6 
  7 from setuptools import setup
  8 
  9 from codespell_lib import __version__
  10 
  11 DISTNAME = 'codespell'
  12 DESCRIPTION = """Codespell"""
  13 MAINTAINER = 'Lucas De Marchi'
  14 MAINTAINER_EMAIL = 'lucas.de.marchi@gmail.com'
  15 URL = 'https://github.com/codespell-project/codespell/'
  16 LICENSE = 'GPL v2'
  17 DOWNLOAD_URL = 'https://github.com/codespell-project/codespell/'
  18 with open('README.rst', 'r') as f:
  19     LONG_DESCRIPTION = f.read()
  20 
  21 if __name__ == "__main__":
  22     if os.path.exists('MANIFEST'):
  23         os.remove('MANIFEST')
  24 
  25     setup(name=DISTNAME,
  26           maintainer=MAINTAINER,
  27           include_package_data=True,
  28           maintainer_email=MAINTAINER_EMAIL,
  29           description=DESCRIPTION,
  30           license=LICENSE,
  31           url=URL,
  32           version=__version__,
  33           download_url=DOWNLOAD_URL,
  34           long_description=LONG_DESCRIPTION,
  35           long_description_content_type='text/x-rst',
  36           zip_safe=False,
  37           classifiers=['Intended Audience :: Developers',
  38                        'License :: OSI Approved',
  39                        'Programming Language :: Python',
  40                        'Topic :: Software Development',
  41                        'Operating System :: Microsoft :: Windows',
  42                        'Operating System :: POSIX',
  43                        'Operating System :: Unix',
  44                        'Operating System :: MacOS'],
  45           platforms='any',
  46           python_requires='>=3.6',
  47           packages=[
  48               'codespell_lib',
  49               'codespell_lib.data',
  50           ],
  51           package_data={'codespell_lib': [
  52               os.path.join('data', 'dictionary*.txt'),
  53               os.path.join('data', 'linux-kernel.exclude'),
  54           ]},
  55           exclude_package_data={'codespell_lib': [
  56               os.path.join('tests', '*'),
  57           ]},
  58           entry_points={
  59               'console_scripts': [
  60                   'codespell = codespell_lib:_script_main'
  61               ],
  62           },
  63           extras_require={
  64               "dev": ["check-manifest", "flake8", "pytest", "pytest-cov",
  65                       "pytest-dependency"],
  66               "hard-encoding-detection": ["chardet"],
  67           }
  68           )
  69
  ```
  --- 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
  @@ -46,15 +46,13 @@
             python_requires='>=3.6',
             packages=[
                 'codespell_lib',
  +              'codespell_lib.tests',
                 'codespell_lib.data',
             ],
             package_data={'codespell_lib': [
                 os.path.join('data', 'dictionary*.txt'),
                 os.path.join('data', 'linux-kernel.exclude'),
             ]},
  -          exclude_package_data={'codespell_lib': [
  -              os.path.join('tests', '*'),
  -          ]},
             entry_points={
                 'console_scripts': [
                     'codespell = codespell_lib:_script_main'
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -46,15 +46,13 @@\n           python_requires='>=3.6',\n           packages=[\n               'codespell_lib',\n+              'codespell_lib.tests',\n               'codespell_lib.data',\n           ],\n           package_data={'codespell_lib': [\n               os.path.join('data', 'dictionary*.txt'),\n               os.path.join('data', 'linux-kernel.exclude'),\n           ]},\n-          exclude_package_data={'codespell_lib': [\n-              os.path.join('tests', '*'),\n-          ]},\n           entry_points={\n               'console_scripts': [\n                   'codespell = codespell_lib:_script_main'\n", "issue": "[Build] QA warning about codespell_lib.tests being installed as data\nWhile packaging v2.2.0 for Gentoo Linux, I got a QA notice about this:\r\n\r\n```\r\n* QA Notice: setuptools warnings detected:\r\n * \r\n *          Installing 'codespell_lib.tests' as data is deprecated, please list it in `packages`.\r\n```\r\n\r\nThe actual setuptools warning is as (here shown for Python 3.11, but same for 3.10)\r\n\r\n```\r\n/usr/lib/python3.11/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Instal\r\nling 'codespell_lib.tests' as data is deprecated, please list it in `packages`.\r\n    !!\r\n\r\n\r\n    ############################\r\n    # Package would be ignored #\r\n    ############################\r\n    Python recognizes 'codespell_lib.tests' as an importable package,\r\n    but it is not listed in the `packages` configuration of setuptools.\r\n\r\n    'codespell_lib.tests' has been automatically added to the distribution only\r\n    because it may contain data files, but this behavior is likely to change\r\n    in future versions of setuptools (and therefore is considered deprecated).\r\n\r\n    Please make sure that 'codespell_lib.tests' is included as a package by using\r\n    the `packages` configuration field or the proper discovery methods\r\n    (for example by using `find_namespace_packages(...)`/`find_namespace:`\r\n    instead of `find_packages(...)`/`find:`).\r\n\r\n    You can read more about \"package discovery\" and \"data files\" on setuptools\r\n    documentation page.\r\n\r\n\r\n!!\r\n\r\n  check.warn(importable)\r\n```\r\n\r\nFind attached the full build log.\r\n[codespell-2.2.0:20220818-083735.log](https://github.com/codespell-project/codespell/files/9371941/codespell-2.2.0.20220818-083735.log)\r\n\n", "before_files": [{"content": "#! /usr/bin/env python\n\n# adapted from mne-python\n\nimport os\n\nfrom setuptools import setup\n\nfrom codespell_lib import __version__\n\nDISTNAME = 'codespell'\nDESCRIPTION = \"\"\"Codespell\"\"\"\nMAINTAINER = 'Lucas De Marchi'\nMAINTAINER_EMAIL = 'lucas.de.marchi@gmail.com'\nURL = 'https://github.com/codespell-project/codespell/'\nLICENSE = 'GPL v2'\nDOWNLOAD_URL = 'https://github.com/codespell-project/codespell/'\nwith open('README.rst', 'r') as f:\n    LONG_DESCRIPTION = f.read()\n\nif __name__ == \"__main__\":\n    if os.path.exists('MANIFEST'):\n        os.remove('MANIFEST')\n\n    setup(name=DISTNAME,\n          maintainer=MAINTAINER,\n          include_package_data=True,\n          maintainer_email=MAINTAINER_EMAIL,\n          description=DESCRIPTION,\n          license=LICENSE,\n          url=URL,\n          version=__version__,\n          download_url=DOWNLOAD_URL,\n          long_description=LONG_DESCRIPTION,\n          long_description_content_type='text/x-rst',\n          zip_safe=False,\n          classifiers=['Intended Audience :: Developers',\n                       'License :: OSI Approved',\n                       'Programming Language :: Python',\n                       'Topic :: Software Development',\n                       'Operating System :: Microsoft :: Windows',\n                       'Operating System :: POSIX',\n                       'Operating System :: Unix',\n                       'Operating System :: MacOS'],\n          platforms='any',\n          python_requires='>=3.6',\n          packages=[\n              'codespell_lib',\n              'codespell_lib.data',\n          ],\n          package_data={'codespell_lib': [\n              os.path.join('data', 'dictionary*.txt'),\n              os.path.join('data', 'linux-kernel.exclude'),\n          ]},\n          exclude_package_data={'codespell_lib': [\n              os.path.join('tests', '*'),\n          ]},\n          entry_points={\n              'console_scripts': [\n                  'codespell = codespell_lib:_script_main'\n              ],\n          },\n          extras_require={\n              \"dev\": [\"check-manifest\", \"flake8\", \"pytest\", \"pytest-cov\",\n                      \"pytest-dependency\"],\n              \"hard-encoding-detection\": [\"chardet\"],\n          }\n          )\n", "path": "setup.py"}], "after_files": [{"content": "#! /usr/bin/env python\n\n# adapted from mne-python\n\nimport os\n\nfrom setuptools import setup\n\nfrom codespell_lib import __version__\n\nDISTNAME = 'codespell'\nDESCRIPTION = \"\"\"Codespell\"\"\"\nMAINTAINER = 'Lucas De Marchi'\nMAINTAINER_EMAIL = 'lucas.de.marchi@gmail.com'\nURL = 'https://github.com/codespell-project/codespell/'\nLICENSE = 'GPL v2'\nDOWNLOAD_URL = 'https://github.com/codespell-project/codespell/'\nwith open('README.rst', 'r') as f:\n    LONG_DESCRIPTION = f.read()\n\nif __name__ == \"__main__\":\n    if os.path.exists('MANIFEST'):\n        os.remove('MANIFEST')\n\n    setup(name=DISTNAME,\n          maintainer=MAINTAINER,\n          include_package_data=True,\n          maintainer_email=MAINTAINER_EMAIL,\n          description=DESCRIPTION,\n          license=LICENSE,\n          url=URL,\n          version=__version__,\n          download_url=DOWNLOAD_URL,\n          long_description=LONG_DESCRIPTION,\n          long_description_content_type='text/x-rst',\n          zip_safe=False,\n          classifiers=['Intended Audience :: Developers',\n                       'License :: OSI Approved',\n                       'Programming Language :: Python',\n                       'Topic :: Software Development',\n                       'Operating System :: Microsoft :: Windows',\n                       'Operating System :: POSIX',\n                       'Operating System :: Unix',\n                       'Operating System :: MacOS'],\n          platforms='any',\n          python_requires='>=3.6',\n          packages=[\n              'codespell_lib',\n              'codespell_lib.tests',\n              'codespell_lib.data',\n          ],\n          package_data={'codespell_lib': [\n              os.path.join('data', 'dictionary*.txt'),\n              os.path.join('data', 'linux-kernel.exclude'),\n          ]},\n          entry_points={\n              'console_scripts': [\n                  'codespell = codespell_lib:_script_main'\n              ],\n          },\n          extras_require={\n              \"dev\": [\"check-manifest\", \"flake8\", \"pytest\", \"pytest-cov\",\n                      \"pytest-dependency\"],\n              \"hard-encoding-detection\": [\"chardet\"],\n          }\n          )\n", "path": "setup.py"}]}