We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Distribution of 42-logitech-unify-permissions.rules
I see `/usr/share/solaar/udev-rules.d/42-logitech-unify-permissions.rules` is installed by the setuptools packaging by default but it has to be installed/copied by user to e.g. `/usr/lib/udev/rules.d/42-logitech-unify-permissions.rules` for it to actually be useful and providing access to the hardware as non-root user.

Could this be installed in the expected (useful) location by default or is there some reason/limitation it's not?

--- 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 subprocess
3 
4 from glob import glob as _glob
5 
6 try:
7     from setuptools import setup
8 except ImportError:
9     from distutils.core import setup
10 
11 NAME = 'Solaar'
12 
13 with open('lib/solaar/version', 'r') as vfile:
14     version = vfile.read().strip()
15 
16 try:  # get commit from git describe
17     commit = subprocess.check_output(['git', 'describe', '--always'], stderr=subprocess.DEVNULL).strip().decode()
18     with open('lib/solaar/commit', 'w') as vfile:
19         vfile.write(f'{commit}\n')
20 except Exception:  # get commit from Ubuntu dpkg-parsechangelog
21     try:
22         commit = subprocess.check_output(['dpkg-parsechangelog', '--show-field', 'Version'],
23                                          stderr=subprocess.DEVNULL).strip().decode()
24         commit = commit.split('~')
25         with open('lib/solaar/commit', 'w') as vfile:
26             vfile.write(f'{commit[0]}\n')
27     except Exception as e:
28         print('Exception using dpkg-parsechangelog', e)
29 
30 
31 def _data_files():
32     from os.path import dirname as _dirname
33 
34     yield 'share/solaar/icons', _glob('share/solaar/icons/solaar*.svg')
35     yield 'share/solaar/icons', _glob('share/solaar/icons/light_*.png')
36     yield 'share/icons/hicolor/scalable/apps', ['share/solaar/icons/solaar.svg']
37 
38     for mo in _glob('share/locale/*/LC_MESSAGES/solaar.mo'):
39         yield _dirname(mo), [mo]
40 
41     yield 'share/applications', ['share/applications/solaar.desktop']
42     yield 'share/solaar/udev-rules.d', ['rules.d/42-logitech-unify-permissions.rules']
43     yield 'share/metainfo', ['share/solaar/io.github.pwr_solaar.solaar.metainfo.xml']
44 
45     del _dirname
46 
47 
48 setup(
49     name=NAME.lower(),
50     version=version,
51     description='Linux device manager for Logitech receivers, keyboards, mice, and tablets.',
52     long_description='''
53 Solaar is a Linux device manager for many Logitech peripherals that connect through
54 Unifying and other receivers or via USB or Bluetooth.
55 Solaar is able to pair/unpair devices with receivers and show and modify some of the
56 modifiable features of devices.
57 For instructions on installing Solaar see https://pwr-solaar.github.io/Solaar/installation'''.strip(),
58     author='Daniel Pavel',
59     license='GPLv2',
60     url='http://pwr-solaar.github.io/Solaar/',
61     classifiers=[
62         'Development Status :: 4 - Beta',
63         'Environment :: X11 Applications :: GTK',
64         'Environment :: Console',
65         'Intended Audience :: End Users/Desktop',
66         'License :: DFSG approved',
67         'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
68         'Natural Language :: English',
69         'Programming Language :: Python :: 3 :: Only',
70         'Operating System :: POSIX :: Linux',
71         'Topic :: Utilities',
72     ],
73     platforms=['linux'],
74 
75     # sudo apt install python-gi python3-gi \
76     #        gir1.2-gtk-3.0 gir1.2-notify-0.7 gir1.2-ayatanaappindicator3-0.1
77     # os_requires=['gi.repository.GObject (>= 2.0)', 'gi.repository.Gtk (>= 3.0)'],
78     python_requires='>=3.7',
79     install_requires=[
80         'evdev (>= 1.1.2)',
81         'pyudev (>= 0.13)',
82         'PyYAML (>= 3.12)',
83         'python-xlib (>= 0.27)',
84         'psutil (>= 5.4.3)',
85         'dbus-python (>=1.3.2)',
86     ],
87     extras_require={
88         'report-descriptor': ['hid-parser'],
89         'desktop-notifications': ['Notify (>= 0.7)'],
90         'git-commit': ['python-git-info'],
91     },
92     package_dir={'': 'lib'},
93     packages=['keysyms', 'hidapi', 'logitech_receiver', 'solaar', 'solaar.ui', 'solaar.cli'],
94     data_files=list(_data_files()),
95     include_package_data=True,
96     scripts=_glob('bin/*'),
97 )
98
```
--- 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
@@ -39,7 +39,7 @@
         yield _dirname(mo), [mo]
 
     yield 'share/applications', ['share/applications/solaar.desktop']
-    yield 'share/solaar/udev-rules.d', ['rules.d/42-logitech-unify-permissions.rules']
+    yield 'lib/udev/rules.d', ['rules.d/42-logitech-unify-permissions.rules']
     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@@ -39,7 +39,7 @@\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 'lib/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", "issue": "Distribution of 42-logitech-unify-permissions.rules\nI see `/usr/share/solaar/udev-rules.d/42-logitech-unify-permissions.rules` is installed by the setuptools packaging by default but it has to be installed/copied by user to e.g. `/usr/lib/udev/rules.d/42-logitech-unify-permissions.rules` for it to actually be useful and providing access to the hardware as non-root user.\r\n\r\nCould this be installed in the expected (useful) location by default or is there some reason/limitation it's not?\n", "before_files": [{"content": "#!/usr/bin/env python3\nimport subprocess\n\nfrom glob import glob as _glob\n\ntry:\n    from setuptools import setup\nexcept ImportError:\n    from distutils.core import setup\n\nNAME = 'Solaar'\n\nwith open('lib/solaar/version', 'r') as vfile:\n    version = vfile.read().strip()\n\ntry:  # get commit from git describe\n    commit = subprocess.check_output(['git', 'describe', '--always'], stderr=subprocess.DEVNULL).strip().decode()\n    with open('lib/solaar/commit', 'w') as vfile:\n        vfile.write(f'{commit}\\n')\nexcept Exception:  # get commit from Ubuntu dpkg-parsechangelog\n    try:\n        commit = subprocess.check_output(['dpkg-parsechangelog', '--show-field', 'Version'],\n                                         stderr=subprocess.DEVNULL).strip().decode()\n        commit = commit.split('~')\n        with open('lib/solaar/commit', 'w') as vfile:\n            vfile.write(f'{commit[0]}\\n')\n    except Exception as e:\n        print('Exception using dpkg-parsechangelog', e)\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 device manager for Logitech receivers, keyboards, mice, and tablets.',\n    long_description='''\nSolaar is a Linux device manager for many Logitech peripherals that connect through\nUnifying and other receivers or via USB or Bluetooth.\nSolaar is able to pair/unpair devices with receivers and show and modify some of the\nmodifiable features of devices.\nFor instructions on installing Solaar see https://pwr-solaar.github.io/Solaar/installation'''.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.7',\n    install_requires=[\n        'evdev (>= 1.1.2)',\n        'pyudev (>= 0.13)',\n        'PyYAML (>= 3.12)',\n        'python-xlib (>= 0.27)',\n        'psutil (>= 5.4.3)',\n        'dbus-python (>=1.3.2)',\n    ],\n    extras_require={\n        'report-descriptor': ['hid-parser'],\n        'desktop-notifications': ['Notify (>= 0.7)'],\n        'git-commit': ['python-git-info'],\n    },\n    package_dir={'': 'lib'},\n    packages=['keysyms', 'hidapi', 'logitech_receiver', 'solaar', 'solaar.ui', 'solaar.cli'],\n    data_files=list(_data_files()),\n    include_package_data=True,\n    scripts=_glob('bin/*'),\n)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python3\nimport subprocess\n\nfrom glob import glob as _glob\n\ntry:\n    from setuptools import setup\nexcept ImportError:\n    from distutils.core import setup\n\nNAME = 'Solaar'\n\nwith open('lib/solaar/version', 'r') as vfile:\n    version = vfile.read().strip()\n\ntry:  # get commit from git describe\n    commit = subprocess.check_output(['git', 'describe', '--always'], stderr=subprocess.DEVNULL).strip().decode()\n    with open('lib/solaar/commit', 'w') as vfile:\n        vfile.write(f'{commit}\\n')\nexcept Exception:  # get commit from Ubuntu dpkg-parsechangelog\n    try:\n        commit = subprocess.check_output(['dpkg-parsechangelog', '--show-field', 'Version'],\n                                         stderr=subprocess.DEVNULL).strip().decode()\n        commit = commit.split('~')\n        with open('lib/solaar/commit', 'w') as vfile:\n            vfile.write(f'{commit[0]}\\n')\n    except Exception as e:\n        print('Exception using dpkg-parsechangelog', e)\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 'lib/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 device manager for Logitech receivers, keyboards, mice, and tablets.',\n    long_description='''\nSolaar is a Linux device manager for many Logitech peripherals that connect through\nUnifying and other receivers or via USB or Bluetooth.\nSolaar is able to pair/unpair devices with receivers and show and modify some of the\nmodifiable features of devices.\nFor instructions on installing Solaar see https://pwr-solaar.github.io/Solaar/installation'''.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.7',\n    install_requires=[\n        'evdev (>= 1.1.2)',\n        'pyudev (>= 0.13)',\n        'PyYAML (>= 3.12)',\n        'python-xlib (>= 0.27)',\n        'psutil (>= 5.4.3)',\n        'dbus-python (>=1.3.2)',\n    ],\n    extras_require={\n        'report-descriptor': ['hid-parser'],\n        'desktop-notifications': ['Notify (>= 0.7)'],\n        'git-commit': ['python-git-info'],\n    },\n    package_dir={'': 'lib'},\n    packages=['keysyms', 'hidapi', 'logitech_receiver', 'solaar', 'solaar.ui', 'solaar.cli'],\n    data_files=list(_data_files()),\n    include_package_data=True,\n    scripts=_glob('bin/*'),\n)\n", "path": "setup.py"}]}