We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
metainfo file installed in the wrong place
**Information**
- Solaar version (`solaar --version` or `git describe --tags` if cloned from this repository): 1.0.4-57-g69f889e
- Distribution: Fedora
- Kernel version (ex. `uname -srmo`): N/A
- Output of `solaar show`:  N/A

**Describe the bug**
The `metainfo.xml` file gets installed into the wrong location, i.e. `/usr/share/metainfo/io.github.pwr_solaar.solaar.metainfo.xml/metainfo.xml`.

**To Reproduce**
Steps to reproduce the behavior (this is part of RPM package build process, hence the `--root xxx` option):
```
...
/usr/bin/python3 setup.py install -O1 --skip-build --root /builddir/build/BUILDROOT/solaar-1.0.4-3.fc33.x86_64
...
running install_data
creating /builddir/build/BUILDROOT/solaar-1.0.4-3.fc33.x86_64/usr/share
...
creating /builddir/build/BUILDROOT/solaar-1.0.4-3.fc33.x86_64/usr/share/metainfo
creating /builddir/build/BUILDROOT/solaar-1.0.4-3.fc33.x86_64/usr/share/metainfo/io.github.pwr_solaar.solaar.metainfo.xml
copying share/solaar/metainfo.xml -> /builddir/build/BUILDROOT/solaar-1.0.4-3.fc33.x86_64/usr/share/metainfo/io.github.pwr_solaar.solaar.metainfo.xml
...
```

**Screenshots**
N/A

**Additional context**
The correct location is: `/usr/share/metainfo/io.github.pwr_solaar.solaar.metainfo.xml` (a file under `/usr/share/metainfo`, not a directory).
The solution is to rename `metainfo.xml` to `io.github.pwr_solaar.solaar.metainfo.xml` and install it under `/usr/share/metainfo` in `setup.py`. I'll send a PR shortly.


--- 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 
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     yield 'share/metainfo/io.github.pwr_solaar.solaar.metainfo.xml', ['share/solaar/metainfo.xml']
28 
29     del _dirname
30 
31 
32 setup(
33     name=NAME.lower(),
34     version=__version__,
35     description='Linux devices manager for the Logitech Unifying Receiver.',
36     long_description='''
37 Solaar is a Linux device manager for Logitech's Unifying Receiver peripherals.
38 It is able to pair/unpair devices with the receiver, for many devices show
39 battery status, and show and modify some of the modifiable features of devices.
40 '''.strip(),
41     author='Daniel Pavel',
42     license='GPLv2',
43     url='http://pwr-solaar.github.io/Solaar/',
44     classifiers=[
45         'Development Status :: 4 - Beta',
46         'Environment :: X11 Applications :: GTK',
47         'Environment :: Console',
48         'Intended Audience :: End Users/Desktop',
49         'License :: DFSG approved',
50         'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
51         'Natural Language :: English',
52         'Programming Language :: Python :: 3 :: Only',
53         'Operating System :: POSIX :: Linux',
54         'Topic :: Utilities',
55     ],
56     platforms=['linux'],
57 
58     # sudo apt install python-gi python3-gi \
59     #        gir1.2-gtk-3.0 gir1.2-notify-0.7 gir1.2-ayatanaappindicator3-0.1
60     # os_requires=['gi.repository.GObject (>= 2.0)', 'gi.repository.Gtk (>= 3.0)'],
61     python_requires='>=3.6',
62     install_requires=[
63         'pyudev (>= 0.13)',
64         'PyYAML (>= 5.1)',
65         'python-xlib (>= 0.27)',
66         'psutil (>= 5.6.0)',
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 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()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -24,7 +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']
+    yield 'share/metainfo', ['share/solaar/io.github.pwr_solaar.solaar.metainfo.xml']
 
     del _dirname

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -24,7 +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+    yield 'share/metainfo', ['share/solaar/io.github.pwr_solaar.solaar.metainfo.xml']\n \n     del _dirname\n", "issue": "metainfo file installed in the wrong place\n**Information**\r\n- Solaar version (`solaar --version` or `git describe --tags` if cloned from this repository): 1.0.4-57-g69f889e\r\n- Distribution: Fedora\r\n- Kernel version (ex. `uname -srmo`): N/A\r\n- Output of `solaar show`:  N/A\r\n\r\n**Describe the bug**\r\nThe `metainfo.xml` file gets installed into the wrong location, i.e. `/usr/share/metainfo/io.github.pwr_solaar.solaar.metainfo.xml/metainfo.xml`.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior (this is part of RPM package build process, hence the `--root xxx` option):\r\n```\r\n...\r\n/usr/bin/python3 setup.py install -O1 --skip-build --root /builddir/build/BUILDROOT/solaar-1.0.4-3.fc33.x86_64\r\n...\r\nrunning install_data\r\ncreating /builddir/build/BUILDROOT/solaar-1.0.4-3.fc33.x86_64/usr/share\r\n...\r\ncreating /builddir/build/BUILDROOT/solaar-1.0.4-3.fc33.x86_64/usr/share/metainfo\r\ncreating /builddir/build/BUILDROOT/solaar-1.0.4-3.fc33.x86_64/usr/share/metainfo/io.github.pwr_solaar.solaar.metainfo.xml\r\ncopying share/solaar/metainfo.xml -> /builddir/build/BUILDROOT/solaar-1.0.4-3.fc33.x86_64/usr/share/metainfo/io.github.pwr_solaar.solaar.metainfo.xml\r\n...\r\n```\r\n\r\n**Screenshots**\r\nN/A\r\n\r\n**Additional context**\r\nThe correct location is: `/usr/share/metainfo/io.github.pwr_solaar.solaar.metainfo.xml` (a file under `/usr/share/metainfo`, not a directory).\r\nThe solution is to rename `metainfo.xml` to `io.github.pwr_solaar.solaar.metainfo.xml` and install it under `/usr/share/metainfo` in `setup.py`. I'll send a PR shortly.\r\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    yield 'share/metainfo/io.github.pwr_solaar.solaar.metainfo.xml', ['share/solaar/metainfo.xml']\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        'psutil (>= 5.6.0)',\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"}], "after_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    yield 'share/metainfo', ['share/solaar/io.github.pwr_solaar.solaar.metainfo.xml']\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        'psutil (>= 5.6.0)',\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"}]}