prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  PyPI tarball missing required files
  ### Describe the bug
  
  The tarball uploaded to PyPI does not contain `requirements/*` files which are required to run the `setup.py` file.
  
  ### Reproduction steps
  
  ```bash
  $ wget https://files.pythonhosted.org/packages/source/k/kornia/kornia-0.6.0.tar.gz
  $ tar zxf kornia-0.6.0.tar.gz
  $ cd kornia-0.6.0
  $ python setup.py install
  ...
  Traceback (most recent call last):
    File "setup.py", line 43, in <module>
      "x": load_requirements("requirements/x.txt"),
    File "setup.py", line 38, in load_requirements
      with open(filename) as f:
  FileNotFoundError: [Errno 2] No such file or directory: 'requirements/x.txt'
  ```
  
  
  ### Expected behavior
  
  I would expect the `setup.py` to function correctly. I believe there's a setuptools option to control which files get included in the upload tarball.
  
  ### Environment
  
  ```shell
  - PyTorch Version (e.g., 1.0): 1.10
  - OS (e.g., Linux): macOS
  - How you installed PyTorch (`conda`, `pip`, source): `spack`
  - Build command you used (if compiling from source): `python setup.py install`
  - Python version: 3.8.11
  - CUDA/cuDNN version: N/A
  - GPU models and configuration: N/A
  - Any other relevant information: N/A
  ```
  
  
  ### Additional context
  
  _No response_
  
  </issue>
  <code>
  [start of setup.py]
  1 # Welcome to the Kornia setup.py.
  2 #
  3 import re
  4 import sys
  5 
  6 # Make sure that kornia is running on Python 3.6.0 or later
  7 # (to avoid running into this bug: https://bugs.python.org/issue29246)
  8 
  9 if sys.version_info < (3, 6, 0):
  10     raise RuntimeError("Kornia requires Python 3.6.0 or later.")
  11 
  12 
  13 from setuptools import find_packages, setup
  14 
  15 
  16 def find_version(file_path: str) -> str:
  17     version_file = open(file_path).read()
  18     version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
  19     if not version_match:
  20         raise RuntimeError(f"Unable to find version string in {file_path}")
  21     return version_match.group(1)
  22 
  23 
  24 VERSION = find_version("kornia/_version.py")
  25 
  26 
  27 # NOTE: kornia MUST only require PyTorch
  28 requirements = [
  29     'torch>=1.8.1', 'packaging',
  30 ]
  31 
  32 # open readme file and set long description
  33 with open("README.md", encoding="utf-8") as fh:
  34     long_description = fh.read()
  35 
  36 
  37 def load_requirements(filename: str):
  38     with open(filename) as f:
  39         return [x.strip() for x in f.readlines() if "-r" != x[0:2]]
  40 
  41 
  42 requirements_extras = {
  43     "x": load_requirements("requirements/x.txt"),
  44     "dev": load_requirements("requirements/dev.txt")
  45 }
  46 requirements_extras["all"] = requirements_extras["x"] + requirements_extras["dev"]
  47 
  48 
  49 if __name__ == '__main__':
  50     setup(
  51         name='kornia',
  52         version=VERSION,
  53         author='Edgar Riba',
  54         author_email='edgar@kornia.org',
  55         url='https://www.kornia.org',
  56         download_url='https://github.com/kornia/kornia',
  57         license='Apache License 2.0',
  58         description='Open Source Differentiable Computer Vision Library for PyTorch',
  59         long_description=long_description,
  60         long_description_content_type='text/markdown',
  61         python_requires='>=3.6',
  62         setup_requires=['pytest-runner'],
  63         tests_require=['pytest'],
  64         packages=find_packages(exclude=('docs', 'test', 'examples')),
  65         package_data={"kornia": ["py.typed"]},
  66         zip_safe=True,
  67         install_requires=requirements,
  68         extras_require=requirements_extras,
  69         keywords=['computer vision', 'deep learning', 'pytorch'],
  70         project_urls={
  71             "Bug Tracker": "https://github.com/kornia/kornia/issues",
  72             "Documentation": "https://kornia.readthedocs.io/en/latest",
  73             "Source Code": "https://github.com/kornia/kornia",
  74         },
  75         classifiers=[
  76             'Environment :: GPU',
  77             'Environment :: Console',
  78             'Natural Language :: English',
  79             # How mature is this project? Common values are
  80             #   3 - Alpha, 4 - Beta, 5 - Production/Stable
  81             'Development Status :: 4 - Beta',
  82             # Indicate who your project is intended for
  83             'Intended Audience :: Developers',
  84             'Intended Audience :: Education',
  85             'Intended Audience :: Science/Research',
  86             'Intended Audience :: Information Technology',
  87             'Topic :: Software Development :: Libraries',
  88             'Topic :: Scientific/Engineering :: Artificial Intelligence',
  89             'Topic :: Scientific/Engineering :: Image Processing',
  90             # Pick your license as you wish
  91             'License :: OSI Approved :: Apache Software License',
  92             'Operating System :: OS Independent',
  93             # Specify the Python versions you support here. In particular, ensure
  94             # that you indicate whether you support Python 2, Python 3 or both.
  95             'Programming Language :: Python :: 3',
  96             'Programming Language :: Python :: 3.6',
  97             'Programming Language :: Python :: 3.7',
  98             'Programming Language :: Python :: 3.8',
  99         ],
  100     )
  101
  [end of setup.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -63,6 +63,7 @@
           tests_require=['pytest'],
           packages=find_packages(exclude=('docs', 'test', 'examples')),
           package_data={"kornia": ["py.typed"]},
  +        data_files=[('', ['requirements/x.txt', 'requirements/dev.txt'])],
           zip_safe=True,
           install_requires=requirements,
           extras_require=requirements_extras,
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -63,6 +63,7 @@\n         tests_require=['pytest'],\n         packages=find_packages(exclude=('docs', 'test', 'examples')),\n         package_data={\"kornia\": [\"py.typed\"]},\n+        data_files=[('', ['requirements/x.txt', 'requirements/dev.txt'])],\n         zip_safe=True,\n         install_requires=requirements,\n         extras_require=requirements_extras,\n", "issue": "PyPI tarball missing required files\n### Describe the bug\r\n\r\nThe tarball uploaded to PyPI does not contain `requirements/*` files which are required to run the `setup.py` file.\r\n\r\n### Reproduction steps\r\n\r\n```bash\r\n$ wget https://files.pythonhosted.org/packages/source/k/kornia/kornia-0.6.0.tar.gz\r\n$ tar zxf kornia-0.6.0.tar.gz\r\n$ cd kornia-0.6.0\r\n$ python setup.py install\r\n...\r\nTraceback (most recent call last):\r\n  File \"setup.py\", line 43, in <module>\r\n    \"x\": load_requirements(\"requirements/x.txt\"),\r\n  File \"setup.py\", line 38, in load_requirements\r\n    with open(filename) as f:\r\nFileNotFoundError: [Errno 2] No such file or directory: 'requirements/x.txt'\r\n```\r\n\r\n\r\n### Expected behavior\r\n\r\nI would expect the `setup.py` to function correctly. I believe there's a setuptools option to control which files get included in the upload tarball.\r\n\r\n### Environment\r\n\r\n```shell\r\n- PyTorch Version (e.g., 1.0): 1.10\r\n- OS (e.g., Linux): macOS\r\n- How you installed PyTorch (`conda`, `pip`, source): `spack`\r\n- Build command you used (if compiling from source): `python setup.py install`\r\n- Python version: 3.8.11\r\n- CUDA/cuDNN version: N/A\r\n- GPU models and configuration: N/A\r\n- Any other relevant information: N/A\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\n", "before_files": [{"content": "# Welcome to the Kornia setup.py.\n#\nimport re\nimport sys\n\n# Make sure that kornia is running on Python 3.6.0 or later\n# (to avoid running into this bug: https://bugs.python.org/issue29246)\n\nif sys.version_info < (3, 6, 0):\n    raise RuntimeError(\"Kornia requires Python 3.6.0 or later.\")\n\n\nfrom setuptools import find_packages, setup\n\n\ndef find_version(file_path: str) -> str:\n    version_file = open(file_path).read()\n    version_match = re.search(r\"^__version__ = ['\\\"]([^'\\\"]*)['\\\"]\", version_file, re.M)\n    if not version_match:\n        raise RuntimeError(f\"Unable to find version string in {file_path}\")\n    return version_match.group(1)\n\n\nVERSION = find_version(\"kornia/_version.py\")\n\n\n# NOTE: kornia MUST only require PyTorch\nrequirements = [\n    'torch>=1.8.1', 'packaging',\n]\n\n# open readme file and set long description\nwith open(\"README.md\", encoding=\"utf-8\") as fh:\n    long_description = fh.read()\n\n\ndef load_requirements(filename: str):\n    with open(filename) as f:\n        return [x.strip() for x in f.readlines() if \"-r\" != x[0:2]]\n\n\nrequirements_extras = {\n    \"x\": load_requirements(\"requirements/x.txt\"),\n    \"dev\": load_requirements(\"requirements/dev.txt\")\n}\nrequirements_extras[\"all\"] = requirements_extras[\"x\"] + requirements_extras[\"dev\"]\n\n\nif __name__ == '__main__':\n    setup(\n        name='kornia',\n        version=VERSION,\n        author='Edgar Riba',\n        author_email='edgar@kornia.org',\n        url='https://www.kornia.org',\n        download_url='https://github.com/kornia/kornia',\n        license='Apache License 2.0',\n        description='Open Source Differentiable Computer Vision Library for PyTorch',\n        long_description=long_description,\n        long_description_content_type='text/markdown',\n        python_requires='>=3.6',\n        setup_requires=['pytest-runner'],\n        tests_require=['pytest'],\n        packages=find_packages(exclude=('docs', 'test', 'examples')),\n        package_data={\"kornia\": [\"py.typed\"]},\n        zip_safe=True,\n        install_requires=requirements,\n        extras_require=requirements_extras,\n        keywords=['computer vision', 'deep learning', 'pytorch'],\n        project_urls={\n            \"Bug Tracker\": \"https://github.com/kornia/kornia/issues\",\n            \"Documentation\": \"https://kornia.readthedocs.io/en/latest\",\n            \"Source Code\": \"https://github.com/kornia/kornia\",\n        },\n        classifiers=[\n            'Environment :: GPU',\n            'Environment :: Console',\n            'Natural Language :: English',\n            # How mature is this project? Common values are\n            #   3 - Alpha, 4 - Beta, 5 - Production/Stable\n            'Development Status :: 4 - Beta',\n            # Indicate who your project is intended for\n            'Intended Audience :: Developers',\n            'Intended Audience :: Education',\n            'Intended Audience :: Science/Research',\n            'Intended Audience :: Information Technology',\n            'Topic :: Software Development :: Libraries',\n            'Topic :: Scientific/Engineering :: Artificial Intelligence',\n            'Topic :: Scientific/Engineering :: Image Processing',\n            # Pick your license as you wish\n            'License :: OSI Approved :: Apache Software License',\n            'Operating System :: OS Independent',\n            # Specify the Python versions you support here. In particular, ensure\n            # that you indicate whether you support Python 2, Python 3 or both.\n            'Programming Language :: Python :: 3',\n            'Programming Language :: Python :: 3.6',\n            'Programming Language :: Python :: 3.7',\n            'Programming Language :: Python :: 3.8',\n        ],\n    )\n", "path": "setup.py"}]}