Skip to content

Commit

Permalink
fixed shared lib detection code
Browse files Browse the repository at this point in the history
  • Loading branch information
vsoftco committed Dec 1, 2023
1 parent 74680d8 commit 9fa724b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions oqs/oqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,19 @@


def _load_shared_obj(name):
"""Attempts to load native OQS library."""
"""Attempts to load shared library."""
paths = []

# search typical locations
paths += [ctu.find_library(name)]
paths += [ctu.find_library("lib" + name)]
try:
paths += [ctu.find_library(name)]
except FileNotFoundError:
pass
try:
paths += [ctu.find_library("lib" + name)]
except FileNotFoundError:
pass

dll = ct.windll if platform.system() == "Windows" else ct.cdll

for path in paths:
Expand Down

0 comments on commit 9fa724b

Please sign in to comment.