prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Please create an AppData file for Solaar
  Please consider writing and installing an AppData file with the application description and some screenshots, else Solaar looks really bad in the GNOME and KDE Software Centers. We'd love to showcase more applications, but without the extra data file we can't. See http://people.freedesktop.org/~hughsient/appdata/ for details; thanks!
  
  Richard
  
  
  </issue>
  <code>
  [start of setup.py]
  1 #!/usr/bin/env python3
  2 
  3 from glob import glob as _glob
  4 
  5 try:
  6     from setuptools import setup
  7 except ImportError:
  8     from distutils.core import setup
  9 
  10 # from solaar import NAME, __version__
  11 __version__ = '1.0.4'
  12 NAME = 'Solaar'
  13 
  14 
  15 def _data_files():
  16     from os.path import dirname as _dirname
  17 
  18     yield 'share/solaar/icons', _glob('share/solaar/icons/solaar*.svg')
  19     yield 'share/solaar/icons', _glob('share/solaar/icons/light_*.png')
  20     yield 'share/icons/hicolor/scalable/apps', ['share/solaar/icons/solaar.svg']
  21 
  22     for mo in _glob('share/locale/*/LC_MESSAGES/solaar.mo'):
  23         yield _dirname(mo), [mo]
  24 
  25     yield 'share/applications', ['share/applications/solaar.desktop']
  26     yield 'share/solaar/udev-rules.d', ['rules.d/42-logitech-unify-permissions.rules']
  27 
  28     del _dirname
  29 
  30 
  31 setup(
  32     name=NAME.lower(),
  33     version=__version__,
  34     description='Linux devices manager for the Logitech Unifying Receiver.',
  35     long_description='''
  36 Solaar is a Linux device manager for Logitech's Unifying Receiver peripherals.
  37 It is able to pair/unpair devices with the receiver, for many devices show
  38 battery status, and show and modify some of the modifiable features of devices.
  39 '''.strip(),
  40     author='Daniel Pavel',
  41     license='GPLv2',
  42     url='http://pwr-solaar.github.io/Solaar/',
  43     classifiers=[
  44         'Development Status :: 4 - Beta',
  45         'Environment :: X11 Applications :: GTK',
  46         'Environment :: Console',
  47         'Intended Audience :: End Users/Desktop',
  48         'License :: DFSG approved',
  49         'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
  50         'Natural Language :: English',
  51         'Programming Language :: Python :: 3 :: Only',
  52         'Operating System :: POSIX :: Linux',
  53         'Topic :: Utilities',
  54     ],
  55     platforms=['linux'],
  56 
  57     # sudo apt install python-gi python3-gi \
  58     #        gir1.2-gtk-3.0 gir1.2-notify-0.7 gir1.2-ayatanaappindicator3-0.1
  59     # os_requires=['gi.repository.GObject (>= 2.0)', 'gi.repository.Gtk (>= 3.0)'],
  60     python_requires='>=3.6',
  61     install_requires=[
  62         'pyudev (>= 0.13)',
  63         'PyYAML (>= 5.1)',
  64         'python-xlib (>= 0.27)',
  65         'pynput (>= 1.7.0)',
  66         'psutil (>= 5.7.3)',
  67     ],
  68     package_dir={'': 'lib'},
  69     packages=['hidapi', 'logitech_receiver', 'solaar', 'solaar.ui', 'solaar.cli'],
  70     data_files=list(_data_files()),
  71     scripts=_glob('bin/*'),
  72 )
  73
  [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
  @@ -24,6 +24,7 @@
   
       yield 'share/applications', ['share/applications/solaar.desktop']
       yield 'share/solaar/udev-rules.d', ['rules.d/42-logitech-unify-permissions.rules']
  +    yield 'share/metainfo/io.github.pwr_solaar.solaar.metainfo.xml', ['share/solaar/metainfo.xml']
   
       del _dirname
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -24,6 +24,7 @@\n \n     yield 'share/applications', ['share/applications/solaar.desktop']\n     yield 'share/solaar/udev-rules.d', ['rules.d/42-logitech-unify-permissions.rules']\n+    yield 'share/metainfo/io.github.pwr_solaar.solaar.metainfo.xml', ['share/solaar/metainfo.xml']\n \n     del _dirname\n", "issue": "Please create an AppData file for Solaar\nPlease consider writing and installing an AppData file with the application description and some screenshots, else Solaar looks really bad in the GNOME and KDE Software Centers. We'd love to showcase more applications, but without the extra data file we can't. See http://people.freedesktop.org/~hughsient/appdata/ for details; thanks!\n\nRichard\n\n", "before_files": [{"content": "#!/usr/bin/env python3\n\nfrom glob import glob as _glob\n\ntry:\n    from setuptools import setup\nexcept ImportError:\n    from distutils.core import setup\n\n# from solaar import NAME, __version__\n__version__ = '1.0.4'\nNAME = 'Solaar'\n\n\ndef _data_files():\n    from os.path import dirname as _dirname\n\n    yield 'share/solaar/icons', _glob('share/solaar/icons/solaar*.svg')\n    yield 'share/solaar/icons', _glob('share/solaar/icons/light_*.png')\n    yield 'share/icons/hicolor/scalable/apps', ['share/solaar/icons/solaar.svg']\n\n    for mo in _glob('share/locale/*/LC_MESSAGES/solaar.mo'):\n        yield _dirname(mo), [mo]\n\n    yield 'share/applications', ['share/applications/solaar.desktop']\n    yield 'share/solaar/udev-rules.d', ['rules.d/42-logitech-unify-permissions.rules']\n\n    del _dirname\n\n\nsetup(\n    name=NAME.lower(),\n    version=__version__,\n    description='Linux devices manager for the Logitech Unifying Receiver.',\n    long_description='''\nSolaar is a Linux device manager for Logitech's Unifying Receiver peripherals.\nIt is able to pair/unpair devices with the receiver, for many devices show\nbattery status, and show and modify some of the modifiable features of devices.\n'''.strip(),\n    author='Daniel Pavel',\n    license='GPLv2',\n    url='http://pwr-solaar.github.io/Solaar/',\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Environment :: X11 Applications :: GTK',\n        'Environment :: Console',\n        'Intended Audience :: End Users/Desktop',\n        'License :: DFSG approved',\n        'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',\n        'Natural Language :: English',\n        'Programming Language :: Python :: 3 :: Only',\n        'Operating System :: POSIX :: Linux',\n        'Topic :: Utilities',\n    ],\n    platforms=['linux'],\n\n    # sudo apt install python-gi python3-gi \\\n    #        gir1.2-gtk-3.0 gir1.2-notify-0.7 gir1.2-ayatanaappindicator3-0.1\n    # os_requires=['gi.repository.GObject (>= 2.0)', 'gi.repository.Gtk (>= 3.0)'],\n    python_requires='>=3.6',\n    install_requires=[\n        'pyudev (>= 0.13)',\n        'PyYAML (>= 5.1)',\n        'python-xlib (>= 0.27)',\n        'pynput (>= 1.7.0)',\n        'psutil (>= 5.7.3)',\n    ],\n    package_dir={'': 'lib'},\n    packages=['hidapi', 'logitech_receiver', 'solaar', 'solaar.ui', 'solaar.cli'],\n    data_files=list(_data_files()),\n    scripts=_glob('bin/*'),\n)\n", "path": "setup.py"}]}