Rework the loading of package included files (glade, images, css)
Created by: Starch
I use to install paperwork by creating a virtualenv then running pip3 install paperwork
in it.
Doing that, I come across the dreaded Exception: Can't find resource file 'mainwindow/appmenu.xml'. Aborting
. This is because of the prepending of sys.prefix
to data files in setup.py (which is already done by pip)
This patch removes the sys.prefix
, adds the include_package_data
option to setup, add missing resources (images) to paperwork.frontend module and loads resources using pkg_resources, making it work with pip+virtualenv.
The icon from main menu is still missing, not sure why.
(this is mostly the same as PR #608 but goes a bit further, hope this one works)
Patch is against stable.