From c488fa936ab5817d455a9bfe27d0c17c99933cc5 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Wed, 12 Jun 2024 20:10:06 +0200 Subject: [PATCH] Revert "Add search path to occt libraries" This reverts commit 7ac609cbefa6db19755a548d009c2f84861fa90a. --- python/__init__.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/python/__init__.py b/python/__init__.py index 3041a2364..df3e979a2 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -1,31 +1,10 @@ import os import sys -import importlib.metadata -from pathlib import Path from . import config _netgen_bin_dir=os.path.realpath(os.path.join(os.path.dirname(__file__),'..',config.NETGEN_PYTHON_RPATH_BIN)) _netgen_lib_dir=os.path.realpath(os.path.join(os.path.dirname(__file__),'..',config.NETGEN_PYTHON_RPATH)) -def _add_shared_lib_path(p: Path): - print("Adding shared search path", f.locate().parent) - if sys.platform.startswith('win'): - os.add_dll_directory(p) - elif 'linux' in sys.platform: - if str(p) not in os.environ['LD_LIBRARY_PATH']: - os.environ['LD_LIBRARY_PATH'] = str(p) + ':' + os.environ['LD_LIBRARY_PATH'] - elif 'darwin' in sys.platform: - if str(p) not in os.environ['DYLD_LIBRARY_PATH']: - os.environ['DYLD_LIBRARY_PATH'] = str(p) + ':' + os.environ['DYLD_LIBRARY_PATH'] -try: - importlib.metadata.metadata('netgen-occt') - for f in importlib.metadata.files('netgen-occt'): - if f.match('*libTKernel*'): - print("Adding shared search path", f.locate().parent) - _add_shared_lib_path(f.locate().parent) -except importlib.metadata.PackageNotFoundError: - pass - __diagnostics_template = """ Netgen diagnostics: sys.platform: {sys.platform}