Skip to content

Commit

Permalink
lib load update
Browse files Browse the repository at this point in the history
  • Loading branch information
remade committed Dec 23, 2024
1 parent f2a35fd commit 21ec2a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions surrealdb/connection_clib.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

def get_lib_path() -> str:
if platform.system() == "Linux":
lib_extension = ".so"
lib_file = "libsurrealdb_c.so"
elif platform.system() == "Darwin":
lib_extension = ".dylib"
lib_file = "libsurrealdb_c.dylib"
elif platform.system() == "Windows":
lib_extension = ".dll"
lib_file = "surrealdb_c.dll"
else:
raise SurrealDbConnectionError("Unsupported operating system")

lib_path = os.path.join(CLIB_FOLDER_PATH, f"libsurrealdb_c{lib_extension}")
lib_path = os.path.join(CLIB_FOLDER_PATH, f"{lib_file}")
if os.path.isfile(lib_path) is not True:
raise Exception(f"{lib_path} is missing")

Expand Down

0 comments on commit 21ec2a8

Please sign in to comment.