-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathpyproject.toml
More file actions
118 lines (104 loc) · 3.28 KB
/
pyproject.toml
File metadata and controls
118 lines (104 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
[build-system]
requires = ["scikit-build-core>=0.12.2"]
build-backend = "scikit_build_core.build"
[project]
name = "llama_cpp_python"
dynamic = ["version"]
description = "Python bindings for the llama.cpp library"
readme = "README.md"
license = { text = "MIT" }
authors = [
{ name = "Andrei Betlen", email = "abetlen@gmail.com" },
]
dependencies = [
"typing-extensions>=4.5.0",
"numpy>=1.20.0",
"diskcache>=5.6.1",
"jinja2>=2.11.3",
]
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
[project.optional-dependencies]
server = [
"uvicorn>=0.22.0",
"fastapi>=0.100.0",
"pydantic-settings>=2.0.1",
"sse-starlette>=1.6.1",
"starlette-context>=0.3.6,<0.4",
"PyYAML>=5.1",
]
test = [
"pytest>=7.4.0",
"httpx>=0.24.1",
"scipy>=1.10",
"fastapi>=0.100.0",
"sse-starlette>=1.6.1",
"starlette-context>=0.3.6,<0.4",
"pydantic-settings>=2.0.1",
"huggingface-hub>=0.23.0"
]
dev = [
"ruff>=0.15.7",
"twine>=4.0.2",
"mkdocs>=1.4.3",
"mkdocstrings[python]>=0.22.0",
"mkdocs-material>=9.1.18",
"pytest>=7.4.0",
"httpx>=0.24.1",
]
all = [
"llama_cpp_python[server,test,dev]",
]
[tool.scikit-build]
wheel.packages = ["llama_cpp"]
wheel.py-api = "py3"
cmake.verbose = true
cmake.minimum-version = "3.21"
minimum-version = "0.5.1"
sdist.include = [".git", "vendor/llama.cpp/*"]
[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "llama_cpp/__init__.py"
[project.urls]
Homepage = "https://github.com/abetlen/llama-cpp-python"
Issues = "https://github.com/abetlen/llama-cpp-python/issues"
Documentation = "https://llama-cpp-python.readthedocs.io/en/latest/"
Changelog = "https://llama-cpp-python.readthedocs.io/en/latest/changelog/"
[tool.ruff]
target-version = "py38"
line-length = 88
required-version = ">=0.15.7"
src = ["llama_cpp", "tests"]
extend-exclude = ["vendor", "examples/notebooks"]
[tool.ruff.lint]
select = ["E4", "E7", "E9"]
ignore = ["E712"]
[tool.pytest.ini_options]
testpaths = "tests"
[tool.cibuildwheel]
archs = ["auto64"]
# llama.cpp requires glibc 2.31+. manylinux_2_34 is the oldest manylinux image with glibc 2.31.
# see all manylinux images here: https://github.com/pypa/manylinux
manylinux-x86_64-image = "manylinux_2_34"
manylinux-aarch64-image = "manylinux_2_34"
skip = "*musllinux*" # Segmentation fault occurs on musllinux python 3.10+
test-sources = ["tests", "vendor"]
test-command = "pytest -v ./tests"
test-extras = ["test"]
test-skip = "*_riscv64" # riscv64 cannot install test packages (e.g. numpy, scipy, pydantic-core, hf-xet, etc.)
[tool.cibuildwheel.linux]
before-build = "command -v dnf && dnf install -y openssl-devel || (command -v apk && apk add --no-cache openssl-dev) || true"
[tool.cibuildwheel.linux.environment]
CMAKE_ARGS = "-DGGML_NATIVE=OFF"
[tool.cibuildwheel.macos.environment]
CMAKE_ARGS = "-DGGML_NATIVE=OFF"
[tool.cibuildwheel.windows]
repair-wheel-command = "pipx run delvewheel repair --analyze-existing --ignore-existing -w {dest_dir} {wheel}"