Skip to content

Commit

Permalink
System Qrack fallback paths
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed Jun 18, 2024
1 parent 90a4bd1 commit 553e2ae
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion pyqrack/qrack_system/qrack_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,24 @@ def __init__(self):
try:
self.qrack_lib = CDLL(shared_lib_path)
except Exception as e:
print(e)
try:
if _platform == "win32":
shared_lib_path = "C:/Program Files/libqrack*/lib/qrack_pinvoke.lib"
elif _platform == "darwin":
shared_lib_path = "/usr/local/lib/qrack/libqrack_pinvoke.dylib"
else:
shared_lib_path = "/usr/local/lib/qrack/libqrack_pinvoke.so"
self.qrack_lib = CDLL(shared_lib_path)
except Exception as e:
try:
if _platform == "win32":
raise e
elif _platform == "darwin":
shared_lib_path = "/usr/lib/qrack/libqrack_pinvoke.dylib"
else:
shared_lib_path = "/usr/lib/qrack/libqrack_pinvoke.so"
except Exception as e:
print(e)

self.fppow = 5
if "QRACK_FPPOW" in os.environ:
Expand Down

0 comments on commit 553e2ae

Please sign in to comment.