Skip to content

Commit 3cd27c3

Browse files
committed
MAINT: remove unused code
1 parent 9c0f9cb commit 3cd27c3

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

mesonpy/_util.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020
if typing.TYPE_CHECKING: # pragma: no cover
21-
from mesonpy._compat import Iterable, Iterator, Path
21+
from mesonpy._compat import Iterator, Path
2222

2323

2424
@contextlib.contextmanager
@@ -32,19 +32,6 @@ def chdir(path: Path) -> Iterator[Path]:
3232
os.chdir(old_cwd)
3333

3434

35-
@contextlib.contextmanager
36-
def add_ld_path(paths: Iterable[str]) -> Iterator[None]:
37-
"""Context manager helper to add a path to LD_LIBRARY_PATH."""
38-
old_value = os.environ.get('LD_LIBRARY_PATH')
39-
old_paths = old_value.split(os.pathsep) if old_value else []
40-
os.environ['LD_LIBRARY_PATH'] = os.pathsep.join([*paths, *old_paths])
41-
try:
42-
yield
43-
finally:
44-
if old_value is not None: # pragma: no cover
45-
os.environ['LD_LIBRARY_PATH'] = old_value
46-
47-
4835
@contextlib.contextmanager
4936
def create_targz(path: Path) -> Iterator[tarfile.TarFile]:
5037
"""Opens a .tar.gz file in the file system for edition.."""

0 commit comments

Comments
 (0)