File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,11 @@ def _load_shared_obj(
78
78
if platform .system () == "Darwin" :
79
79
paths .append (path .absolute () / Path (f"lib{ name } " ).with_suffix (".dylib" ))
80
80
elif platform .system () == "Windows" :
81
- paths .append (path .absolute () / Path (name ).with_suffix (".dll" ))
82
- # Does not work
83
- # os.environ["PATH"] += os.path.abspath(path)
81
+ # Try both oqs.dll and liboqs.dll in the install path
82
+ for dll_name in (name , f"lib{ name } " ):
83
+ paths .append (
84
+ path .absolute () / Path (dll_name ).with_suffix (".dll" )
85
+ )
84
86
else : # Linux/FreeBSD/UNIX
85
87
paths .append (path .absolute () / Path (f"lib{ name } " ).with_suffix (".so" ))
86
88
# https://stackoverflow.com/questions/856116/changing-ld-library-path-at-runtime-for-ctypes
@@ -230,7 +232,7 @@ def native() -> ct.CDLL:
230
232
231
233
232
234
def oqs_version () -> str :
233
- """` liboqs` version string."""
235
+ """liboqs version string."""
234
236
native ().OQS_version .restype = ct .c_char_p
235
237
return ct .c_char_p (native ().OQS_version ()).value .decode ("UTF-8" ) # type: ignore[union-attr]
236
238
@@ -751,4 +753,4 @@ def get_enabled_sig_mechanisms() -> tuple[str, ...]:
751
753
752
754
def get_supported_sig_mechanisms () -> tuple [str , ...]:
753
755
"""Return the list of supported signature mechanisms."""
754
- return _supported_sigs
756
+ return _supported_sigs
You can’t perform that action at this time.
0 commit comments