Skip to content

Commit

Permalink
Manually import the shared library.
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlegiantJGC committed Nov 25, 2024
1 parent ec9ebda commit de214fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/leveldb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import glob
from typing import TYPE_CHECKING
import collections.abc

Expand Down Expand Up @@ -168,7 +169,8 @@ def _init() -> None:
if sys.platform == "win32":
os.add_dll_directory(path)
else:
os.environ["PATH"] = os.environ.get("PATH", "") + os.pathsep + path
import ctypes
ctypes.cdll.LoadLibrary(glob.glob(os.path.join(glob.escape(path), "*leveldb_mcpe*"))[0])

from ._leveldb import init

Expand Down

0 comments on commit de214fe

Please sign in to comment.