Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions oqs/oqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,11 @@ def _load_shared_obj(
if platform.system() == "Darwin":
paths.append(path.absolute() / Path(f"lib{name}").with_suffix(".dylib"))
elif platform.system() == "Windows":
paths.append(path.absolute() / Path(name).with_suffix(".dll"))
# Does not work
# os.environ["PATH"] += os.path.abspath(path)
# Try both oqs.dll and liboqs.dll in the install path
for dll_name in (name, f"lib{name}"):
paths.append(
path.absolute() / Path(dll_name).with_suffix(".dll")
)
else: # Linux/FreeBSD/UNIX
paths.append(path.absolute() / Path(f"lib{name}").with_suffix(".so"))
# https://stackoverflow.com/questions/856116/changing-ld-library-path-at-runtime-for-ctypes
Expand Down Expand Up @@ -281,7 +283,7 @@ def native() -> ct.CDLL:


def oqs_version() -> str:
"""`liboqs` version string."""
"""liboqs version string."""
native().OQS_version.restype = ct.c_char_p
return ct.c_char_p(native().OQS_version()).value.decode("UTF-8") # type: ignore[union-attr]

Expand Down
Loading