always use relative paths in data_files

instead of absolute paths for sources

seems to have started failing on Windows
This commit is contained in:
Min RK
2021-11-08 13:26:09 +01:00
parent 3caf3cfda8
commit b8965c2017

View File

@@ -46,10 +46,9 @@ def get_data_files():
"""Get data files in share/jupyter"""
data_files = []
ntrim = len(here + os.path.sep)
for (d, dirs, filenames) in os.walk(share_jupyterhub):
data_files.append((d[ntrim:], [pjoin(d, f) for f in filenames]))
rel_d = os.path.relpath(d, here)
data_files.append((rel_d, [os.path.join(rel_d, f) for f in filenames]))
return data_files