Bugfix on Windows with Python>=3.8

Use os.add_dll_directory() instead of adding netgen bin dir to PATH
This commit is contained in:
Matthias Hochsteger 2020-10-20 17:17:01 +02:00
parent 2d03739f4e
commit c2c0bbcbf5

View File

@ -5,7 +5,10 @@ _netgen_bin_dir=os.path.realpath(os.path.join(os.path.dirname(__file__),'..','@N
_netgen_lib_dir=os.path.realpath(os.path.join(os.path.dirname(__file__),'..','@NETGEN_PYTHON_RPATH@')) _netgen_lib_dir=os.path.realpath(os.path.join(os.path.dirname(__file__),'..','@NETGEN_PYTHON_RPATH@'))
if sys.platform.startswith('win'): if sys.platform.startswith('win'):
os.environ['PATH'] += ';'+os.path.realpath(os.path.join(os.path.dirname(__file__),'../../../bin')) if sys.version >= '3.8':
os.add_dll_directory(_netgen_bin_dir)
else:
os.environ['PATH'] += ';'+_netgen_bin_dir
del sys del sys
del os del os