On Tue, 2018-10-02 at 16:30 +0200, Federico Bruni wrote:
Hi folks
While trying to figure out a way to install some desktop specific files
(such as APP.desktop or APP.appdata.xml) within the installation prefix
(instead of python installation) using setuptools, I started wondering
if it's actually a good idea.
Is this something that should be handled by Linux packagers (as it is
now)?
The application I'm working on (upstream) to improve the desktop
related files is Frescobaldi.
As you can see hereĀ¹, the desktop file is copied in the right
directory thanks to the spec file.
Some reasons to keep this behaviour:
- setuptools doesn't provide a way to uninstall a package so you have
to do it manually, while a package removes all the installed files
- if you want to run a python package from source, there's no need to
install it
I'd be interested to know your thoughts.
FWIW, I've both done it and *not* done it, and my thoughts were similar
to yours. You can make it work but it's not the best thing in the
world.
For really simple things I'd say it's probably OK, just include a
warning about the uninstall problem - there is kinda a workaround for
that, IIRC, you can use pip to uninstall the module and it'll wipe the
data files too.
For more complicated things you might want to consider shipping a more
generic deployment process using a Makefile or something, which calls
setup.py but installs and removes the other bits itself.
--
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net