BaseDirectory: take sys.prefix into account
I'm installing an app in a virtualenv, so the app installs its icon in the virtualenv (using setup.py
's data_files
). Outside the virtualenv, sys.prefix
is /usr
, but in the virtualenv, sys.prefix
points to the virtualenv.
xdg.BaseDirectory.load_data_paths
only points to /usr
though, preventing the app to find its icon. So sys.prefix
should be used instead of hardcoding /usr
(or maybe adding both is better).