Skip to content

Commit be8c184

Browse files
committed
Fix 2
1 parent 1cca7d0 commit be8c184

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

oqs/oqs.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,14 @@ def _load_shared_obj(name, additional_searching_paths=None):
5252
# Search additional path, if any
5353
if additional_searching_paths:
5454
for path in additional_searching_paths:
55-
paths.append(
56-
os.path.abspath(path) + os.path.sep + "lib" + name + ".dylib"
57-
) # macOS/OS X
58-
os.environ["LD_LIBRARY_PATH"] += os.path.abspath(path) # Linux
59-
os.environ["PATH"] += os.path.abspath(path) # Windows
55+
if platform.system() == "Darwin":
56+
paths.append(
57+
os.path.abspath(path) + os.path.sep + "lib" + name + ".dylib"
58+
)
59+
if platform.system() == "Linux":
60+
os.environ["LD_LIBRARY_PATH"] += os.path.abspath(path) # Linux
61+
if platform.system() == "Windows":
62+
os.environ["PATH"] += os.path.abspath(path) # Windows
6063

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

0 commit comments

Comments
 (0)