Install script bug: incorrect/inconsistent path to file meld.css
Installed meld version 3.20.1 on CentOS 8. The install script (setup.py install) completes successfully. But then, launching meld errors out:
Couldn’t load Meld-specific CSS (/usr/share/meld/meld.css) gtk-css-provider-error-quark: <broken file>:1:0Failed to import: Error opening file /usr/share/meld/meld.css: No such file or directory (2) Traceback (most recent call last): File "/usr/local/bin/meld", line 368, in <module> import meld.meldapp File "/usr/local/lib/python3.6/site-packages/meld/meldapp.py", line 29, in <module> import meld.ui.util File "/usr/local/lib/python3.6/site-packages/meld/ui/util.py", line 20, in <module> from meld.ui import gladesupport # noqa: F401 File "/usr/local/lib/python3.6/site-packages/meld/ui/gladesupport.py", line 15, in <module> from meld.ui import statusbar # noqa: F401 File "/usr/local/lib/python3.6/site-packages/meld/ui/statusbar.py", line 22, in <module> from meld.ui.bufferselectors import EncodingSelector File "/usr/local/lib/python3.6/site-packages/meld/ui/bufferselectors.py", line 11, in <module> class EncodingSelector(FilteredListSelector, Gtk.Grid): File "/usr/local/lib/python3.6/site-packages/meld/ui/listselector.py", line 13, in add_template template = open(template_path, 'rb').read() FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/meld/ui/encoding-selector.ui'
It appears that meld is looking for file meld.css in directory /usr/share/meld/, but the install script actually placed this file in directory /usr/local/share/meld/. The incorrect path is written by the install script into file conf.py (which is located at /usr/local/lib/python3.6/site-packages/meld/conf.py post-installation). On line 10 of conf.py after installation:
DATADIR = "/usr/share/meld"
Changing this to:
DATADIR = "/usr/local/share/meld"
fixes the problem.