diff --git a/app/services/firebird_service.py b/app/services/firebird_service.py index 79578b9..99f4c0b 100644 --- a/app/services/firebird_service.py +++ b/app/services/firebird_service.py @@ -30,7 +30,17 @@ class FirebirdService: self.conn = None def connect(self, host: str, port: int, database: str, user: str, password: str): + import platform, os try: + if platform.system() == "Darwin": + mac_lib = "/Library/Frameworks/Firebird.framework/Versions/A/Resources/lib/libfbclient.dylib" + if os.path.exists(mac_lib): + os.environ.setdefault("DYLD_LIBRARY_PATH", + "/Library/Frameworks/Firebird.framework/Versions/A/Resources/lib") + try: + fdb.load_api(mac_lib) + except Exception: + pass self.conn = fdb.connect( host=host, port=port,