We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71dbaa2 commit 347ba4aCopy full SHA for 347ba4a
scripts/hook-llama_cpp.py
@@ -7,7 +7,7 @@
7
8
9
from PyInstaller.utils.hooks import collect_data_files, get_package_paths
10
-import os
+import os, sys
11
12
# Get the package path
13
package_path = get_package_paths('llama_cpp')[0]
@@ -19,6 +19,9 @@
19
if os.name == 'nt': # Windows
20
dll_path = os.path.join(package_path, 'llama_cpp', 'llama.dll')
21
datas.append((dll_path, 'llama_cpp'))
22
-elif os.name == 'posix': # Linux/Mac
+elif sys.platform == 'darwin': # Mac
23
+ so_path = os.path.join(package_path, 'llama_cpp', 'llama.dylib')
24
+ datas.append((so_path, 'llama_cpp'))
25
+elif os.name == 'posix': # Linux
26
so_path = os.path.join(package_path, 'llama_cpp', 'llama.so')
27
datas.append((so_path, 'llama_cpp'))
0 commit comments