Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 347ba4a

Browse filesBrowse files
authored
Update hook-llama_cpp.py
osx seems to use dylib
1 parent 71dbaa2 commit 347ba4a
Copy full SHA for 347ba4a

File tree

Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed

‎scripts/hook-llama_cpp.py

Copy file name to clipboardExpand all lines: scripts/hook-llama_cpp.py
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
from PyInstaller.utils.hooks import collect_data_files, get_package_paths
10-
import os
10+
import os, sys
1111

1212
# Get the package path
1313
package_path = get_package_paths('llama_cpp')[0]
@@ -19,6 +19,9 @@
1919
if os.name == 'nt': # Windows
2020
dll_path = os.path.join(package_path, 'llama_cpp', 'llama.dll')
2121
datas.append((dll_path, 'llama_cpp'))
22-
elif os.name == 'posix': # Linux/Mac
22+
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
2326
so_path = os.path.join(package_path, 'llama_cpp', 'llama.so')
2427
datas.append((so_path, 'llama_cpp'))

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.