Skip to content
Open
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
12 changes: 7 additions & 5 deletions oqs/oqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,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 @@ -230,7 +232,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 Expand Up @@ -751,4 +753,4 @@ def get_enabled_sig_mechanisms() -> tuple[str, ...]:

def get_supported_sig_mechanisms() -> tuple[str, ...]:
"""Return the list of supported signature mechanisms."""
return _supported_sigs
return _supported_sigs
Loading