Skip to content

Commit 99d4323

Browse files
committed
windows: remove PathManager
as we only support Python 3.8+
1 parent 66d1e0d commit 99d4323

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

python/eigenpy/windows_dll_manager.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import contextlib
22
import os
3-
import sys
43

54

65
def get_dll_paths():
@@ -22,20 +21,6 @@ def get_dll_paths():
2221
return eigenpy_paths.split(os.pathsep)
2322

2423

25-
class PathManager(contextlib.AbstractContextManager):
26-
"""Restore PATH state after importing Python module"""
27-
28-
def add_dll_directory(self, dll_dir: str):
29-
os.environ["PATH"] += os.pathsep + dll_dir
30-
31-
def __enter__(self):
32-
self.old_path = os.environ["PATH"]
33-
return self
34-
35-
def __exit__(self, *exc_details):
36-
os.environ["PATH"] = self.old_path
37-
38-
3924
class DllDirectoryManager(contextlib.AbstractContextManager):
4025
"""Restore DllDirectory state after importing Python module"""
4126

@@ -59,7 +44,4 @@ def __exit__(self, *exc_details):
5944

6045

6146
def build_directory_manager():
62-
if sys.version_info >= (3, 8):
63-
return DllDirectoryManager()
64-
else:
65-
return PathManager()
47+
return DllDirectoryManager()

0 commit comments

Comments
 (0)