File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -109,9 +109,11 @@ def _load_shared_obj(
109109 if platform .system () == "Darwin" :
110110 paths .append (path .absolute () / Path (f"lib{ name } " ).with_suffix (".dylib" ))
111111 elif platform .system () == "Windows" :
112- paths .append (path .absolute () / Path (name ).with_suffix (".dll" ))
113- # Does not work
114- # os.environ["PATH"] += os.path.abspath(path)
112+ # Try both oqs.dll and liboqs.dll in the install path
113+ for dll_name in (name , f"lib{ name } " ):
114+ paths .append (
115+ path .absolute () / Path (dll_name ).with_suffix (".dll" )
116+ )
115117 else : # Linux/FreeBSD/UNIX
116118 paths .append (path .absolute () / Path (f"lib{ name } " ).with_suffix (".so" ))
117119 # https://stackoverflow.com/questions/856116/changing-ld-library-path-at-runtime-for-ctypes
@@ -281,7 +283,7 @@ def native() -> ct.CDLL:
281283
282284
283285def oqs_version () -> str :
284- """` liboqs` version string."""
286+ """liboqs version string."""
285287 native ().OQS_version .restype = ct .c_char_p
286288 return ct .c_char_p (native ().OQS_version ()).value .decode ("UTF-8" ) # type: ignore[union-attr]
287289
You can’t perform that action at this time.
0 commit comments