prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  PyPI install incorrectly ships a `tests` package
  ### Describe the bug
  
  If you check the `.whl` file of SB 1.0, for instance, you will notice that there is an empty `tests/` (with only the `__init__.py`). This is not a huge deal, but it has the unintended consequence that the user now has a `tests` package at their root level.
  
  ### Expected behaviour
  
  That package should not exist on normal or editable installs.
  
  ### To Reproduce
  
  ```python
  import tests
  ```
  
  ```bash
  $ cat env/lib/python3.xx/speechbrain-xxx.dist-info/top_level.txt 
  speechbrain
  tests
  ```
  
  ### Environment Details
  
  _No response_
  
  ### Relevant Log Output
  
  _No response_
  
  ### Additional Context
  
  This is probably due to the way packages are specified in the `setup.py`.
  
  Does not seem like it would be linked to #2484 but it's worth investigating anyway.
  
  --- 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 python3
  2 import os
  3 import sys
  4 import site
  5 import setuptools
  6 from distutils.core import setup
  7 
  8 
  9 # Editable install in user site directory can be allowed with this hack:
  10 # https://github.com/pypa/pip/issues/7953.
  11 site.ENABLE_USER_SITE = "--user" in sys.argv[1:]
  12 
  13 with open("README.md") as f:
  14     long_description = f.read()
  15 
  16 with open(os.path.join("speechbrain", "version.txt")) as f:
  17     version = f.read().strip()
  18 
  19 setup(
  20     name="speechbrain",
  21     version=version,
  22     description="All-in-one speech toolkit in pure Python and Pytorch",
  23     long_description=long_description,
  24     long_description_content_type="text/markdown",
  25     author="Mirco Ravanelli & Others",
  26     author_email="speechbrain@gmail.com",
  27     classifiers=[
  28         "Programming Language :: Python :: 3",
  29         "License :: OSI Approved :: Apache Software License",
  30     ],
  31     packages=setuptools.find_packages(),
  32     package_data={"speechbrain": ["version.txt", "log-config.yaml"]},
  33     install_requires=[
  34         "hyperpyyaml",
  35         "joblib",
  36         "numpy",
  37         "packaging",
  38         "scipy",
  39         "sentencepiece",
  40         "torch>=1.9",
  41         "torchaudio",
  42         "tqdm",
  43         "huggingface_hub",
  44     ],
  45     python_requires=">=3.8",
  46     url="https://speechbrain.github.io/",
  47 )
  48
  ```
  --- 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
  @@ -28,7 +28,9 @@
           "Programming Language :: Python :: 3",
           "License :: OSI Approved :: Apache Software License",
       ],
  -    packages=setuptools.find_packages(),
  +    # we don't want to ship the tests package. for future proofing, also
  +    # exclude any tests subpackage (if we ever define __init__.py there)
  +    packages=setuptools.find_packages(exclude=["tests", "tests.*"]),
       package_data={"speechbrain": ["version.txt", "log-config.yaml"]},
       install_requires=[
           "hyperpyyaml",
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -28,7 +28,9 @@\n         \"Programming Language :: Python :: 3\",\n         \"License :: OSI Approved :: Apache Software License\",\n     ],\n-    packages=setuptools.find_packages(),\n+    # we don't want to ship the tests package. for future proofing, also\n+    # exclude any tests subpackage (if we ever define __init__.py there)\n+    packages=setuptools.find_packages(exclude=[\"tests\", \"tests.*\"]),\n     package_data={\"speechbrain\": [\"version.txt\", \"log-config.yaml\"]},\n     install_requires=[\n         \"hyperpyyaml\",\n", "issue": "PyPI install incorrectly ships a `tests` package\n### Describe the bug\r\n\r\nIf you check the `.whl` file of SB 1.0, for instance, you will notice that there is an empty `tests/` (with only the `__init__.py`). This is not a huge deal, but it has the unintended consequence that the user now has a `tests` package at their root level.\r\n\r\n### Expected behaviour\r\n\r\nThat package should not exist on normal or editable installs.\r\n\r\n### To Reproduce\r\n\r\n```python\r\nimport tests\r\n```\r\n\r\n```bash\r\n$ cat env/lib/python3.xx/speechbrain-xxx.dist-info/top_level.txt \r\nspeechbrain\r\ntests\r\n```\r\n\r\n### Environment Details\r\n\r\n_No response_\r\n\r\n### Relevant Log Output\r\n\r\n_No response_\r\n\r\n### Additional Context\r\n\r\nThis is probably due to the way packages are specified in the `setup.py`.\r\n\r\nDoes not seem like it would be linked to #2484 but it's worth investigating anyway.\n", "before_files": [{"content": "#!/usr/bin/env python3\nimport os\nimport sys\nimport site\nimport setuptools\nfrom distutils.core import setup\n\n\n# Editable install in user site directory can be allowed with this hack:\n# https://github.com/pypa/pip/issues/7953.\nsite.ENABLE_USER_SITE = \"--user\" in sys.argv[1:]\n\nwith open(\"README.md\") as f:\n    long_description = f.read()\n\nwith open(os.path.join(\"speechbrain\", \"version.txt\")) as f:\n    version = f.read().strip()\n\nsetup(\n    name=\"speechbrain\",\n    version=version,\n    description=\"All-in-one speech toolkit in pure Python and Pytorch\",\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    author=\"Mirco Ravanelli & Others\",\n    author_email=\"speechbrain@gmail.com\",\n    classifiers=[\n        \"Programming Language :: Python :: 3\",\n        \"License :: OSI Approved :: Apache Software License\",\n    ],\n    packages=setuptools.find_packages(),\n    package_data={\"speechbrain\": [\"version.txt\", \"log-config.yaml\"]},\n    install_requires=[\n        \"hyperpyyaml\",\n        \"joblib\",\n        \"numpy\",\n        \"packaging\",\n        \"scipy\",\n        \"sentencepiece\",\n        \"torch>=1.9\",\n        \"torchaudio\",\n        \"tqdm\",\n        \"huggingface_hub\",\n    ],\n    python_requires=\">=3.8\",\n    url=\"https://speechbrain.github.io/\",\n)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python3\nimport os\nimport sys\nimport site\nimport setuptools\nfrom distutils.core import setup\n\n\n# Editable install in user site directory can be allowed with this hack:\n# https://github.com/pypa/pip/issues/7953.\nsite.ENABLE_USER_SITE = \"--user\" in sys.argv[1:]\n\nwith open(\"README.md\") as f:\n    long_description = f.read()\n\nwith open(os.path.join(\"speechbrain\", \"version.txt\")) as f:\n    version = f.read().strip()\n\nsetup(\n    name=\"speechbrain\",\n    version=version,\n    description=\"All-in-one speech toolkit in pure Python and Pytorch\",\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    author=\"Mirco Ravanelli & Others\",\n    author_email=\"speechbrain@gmail.com\",\n    classifiers=[\n        \"Programming Language :: Python :: 3\",\n        \"License :: OSI Approved :: Apache Software License\",\n    ],\n    # we don't want to ship the tests package. for future proofing, also\n    # exclude any tests subpackage (if we ever define __init__.py there)\n    packages=setuptools.find_packages(exclude=[\"tests\", \"tests.*\"]),\n    package_data={\"speechbrain\": [\"version.txt\", \"log-config.yaml\"]},\n    install_requires=[\n        \"hyperpyyaml\",\n        \"joblib\",\n        \"numpy\",\n        \"packaging\",\n        \"scipy\",\n        \"sentencepiece\",\n        \"torch>=1.9\",\n        \"torchaudio\",\n        \"tqdm\",\n        \"huggingface_hub\",\n    ],\n    python_requires=\">=3.8\",\n    url=\"https://speechbrain.github.io/\",\n)\n", "path": "setup.py"}]}