From b35e673aff35b5997a87b39a0ef6678756ec3641 Mon Sep 17 00:00:00 2001 From: Hake Huang Date: Tue, 19 Mar 2024 11:40:29 +0800 Subject: [PATCH] fix searching issue add lib to name twice is only need when first search is failure. otherwise it will fail on ubuntu environment Signed-off-by: Hake Huang --- oqs/oqs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oqs/oqs.py b/oqs/oqs.py index 67a4820..6d10b9d 100644 --- a/oqs/oqs.py +++ b/oqs/oqs.py @@ -25,7 +25,8 @@ def _load_shared_obj(name): # search typical locations paths += [ctu.find_library(name)] - paths += [ctu.find_library("lib" + name)] + if not paths: + paths += [ctu.find_library("lib" + name)] dll = ct.windll if platform.system() == "Windows" else ct.cdll for path in paths: