Skip to content

Commit 34ae6d5

Browse files
committed
better uv config
1 parent e371067 commit 34ae6d5

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

integrations/llama_cpp/pyproject.toml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,22 @@ classifiers = [
2727
"Programming Language :: Python :: Implementation :: PyPy",
2828
]
2929
dependencies = [
30-
"haystack-ai>=2.22.0",
31-
"llama-cpp-python>=0.2.87"
30+
"haystack-ai>=2.22.0", "llama-cpp-python>=0.2.87"
3231
]
3332

34-
# On macOS GitHub runners, we use a custom index to download pre-built wheels.
35-
# Installing from source might fail due to missing dependencies (CMake fails with "OpenMP not found")
36-
[tool.uv]
37-
index-strategy = "unsafe-best-match" # this ensures that packages are not only searched in the below index but also in PyPI
38-
override-dependencies = ["llama-cpp-python!=0.3.20; sys_platform == 'darwin'"] # this version is broken on the additional macOS index
33+
# On macOS, building `llama-cpp-python` from source often fails on GitHub runners (CMake: "OpenMP not found"), so we
34+
# pull pre-built Metal wheels from a custom index. Linux/Windows resolve normally from PyPI.
3935
[[tool.uv.index]]
4036
name = "llama-cpp-python-macos"
4137
url = "https://abetlen.github.io/llama-cpp-python/whl/metal/"
38+
explicit = true
39+
[tool.uv.sources]
40+
llama-cpp-python = [
41+
{ index = "llama-cpp-python-macos", marker = "sys_platform == 'darwin'" },
42+
]
43+
[tool.uv]
44+
# 0.3.20 is broken on the Metal index
45+
override-dependencies = ["llama-cpp-python!=0.3.20; sys_platform == 'darwin'"]
4246

4347
[project.urls]
4448
Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/llama_cpp#readme"

0 commit comments

Comments
 (0)