util: support more `data_files` location
continuous-integration/drone/push Build is passing Details

master
pictuga 2022-01-23 12:40:18 +01:00
parent a01258700d
commit b138f11771
1 changed files with 5 additions and 4 deletions

View File

@ -33,11 +33,12 @@ def data_path(path=''):
return os.path.join(data_path_base, path)
bases = [
os.path.join(sys.prefix, 'share/morss/www'),
os.path.join(sys.prefix, 'share/morss/www'), # when installed as root
pkg_path('../../../share/morss/www'),
pkg_path('../../../../share/morss/www'),
pkg_path('../www'),
pkg_path('../..')
pkg_path('../share/morss/www'), # for `pip install --target=dir morss`
pkg_path('../www'), # when running from source tree
pkg_path('../..'), # when running on `.cgi` subdir on Apache
]
for base in bases: