Skip to content

Commit 80a9973

Browse files
committed
Remove use of chdir
Signed-off-by: martinRenou <[email protected]>
1 parent a5a5bc6 commit 80a9973

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

setup.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
from os import chdir
21
import re
32
import sys
43
from pathlib import Path
5-
from glob import iglob
64

75
import setuptools
86

@@ -13,15 +11,11 @@
1311

1412

1513
def get_data_files():
16-
chdir(str(LABEXTENSIONS_DIR))
17-
1814
extension_files = [
19-
(str(LABEXTENSIONS_INSTALL_DIR / Path(filename).parent), [str(LABEXTENSIONS_DIR / filename)])
20-
for filename in iglob('**/*.*', recursive=True)
15+
(str(LABEXTENSIONS_INSTALL_DIR / file.relative_to(LABEXTENSIONS_DIR)), [str(file)])
16+
for file in LABEXTENSIONS_DIR.rglob("*.*")
2117
]
2218

23-
chdir('../../../')
24-
2519
extension_files.append(("etc/jupyter/jupyter_notebook_config.d", ["py_src/jupyter_lsp/etc/jupyter-lsp-serverextension.json"]))
2620

2721
return extension_files

0 commit comments

Comments
 (0)