File tree Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change 11import contextlib
22import os
3- import sys
43
54
65def 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-
3924class DllDirectoryManager (contextlib .AbstractContextManager ):
4025 """Restore DllDirectory state after importing Python module"""
4126
@@ -59,7 +44,4 @@ def __exit__(self, *exc_details):
5944
6045
6146def build_directory_manager ():
62- if sys .version_info >= (3 , 8 ):
63- return DllDirectoryManager ()
64- else :
65- return PathManager ()
47+ return DllDirectoryManager ()
You can’t perform that action at this time.
0 commit comments