d4nj1 / TLPUI

A GTK user interface for TLP written in Python
GNU General Public License v2.0
1.08k stars 83 forks source link

Fixed location of desktop file after install #131

Closed lRespublica closed 1 year ago

lRespublica commented 1 year ago

Hi, I`m packaging TLPUI for ALT Linux repository.

If we run next commands: /usr/bin/python3 -m pyproject_installer -v build /usr/bin/python3 -m pyproject_installer -v install --destdir=%buildroot

The .desktop file will be located in usr/lib/python3/site-packages/usr/share/applications/ instead of just usr/share/applications This patch puts the file in the right place

d4nj1 commented 1 year ago

Hi, I just read up https://docs.python.org/3/distutils/setupscript.html#installing-additional-files

The directory should be a relative path. It is interpreted relative to the installation prefix (Python’s sys.prefix for system installations; site.USER_BASE for user installations). Distutils allows directory to be an absolute installation path, but this is discouraged since it is incompatible with the wheel packaging format. No directory information from files is used to determine the final location of the installed file; only the name of the file is used.

so I imagine your suggested change should be right in most cases.

Thanks for your contribution!