Skip to content

Commit fe874f6

Browse files
committed
sdist: include .ggml_build_number in tarball
With that, builds using tarball will still have the correct cmake package version for ggml. This assumes the file is read by llama.cpp build system, see: ggml-org/llama.cpp#12509 Fixes abetlen#1979 Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
1 parent 37eb5f0 commit fe874f6

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

.github/workflows/publish.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v4
1414
with:
15+
fetch-depth: 0
1516
submodules: "recursive"
1617

1718
- name: Set up Python
@@ -41,6 +42,7 @@ jobs:
4142

4243
- name: Build source distribution
4344
run: |
45+
(cd vendor/llama.cpp && git rev-list --count HEAD) > .ggml_build_number
4446
python -m build --sdist
4547
4648
- name: Publish distribution to PyPI

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ share/python-wheels/
4242
.installed.cfg
4343
*.egg
4444
MANIFEST
45+
.ggml_build_number
4546

4647
# PyInstaller
4748
# Usually these files are written by a python script from a template

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ wheel.packages = ["llama_cpp"]
6565
cmake.verbose = true
6666
cmake.minimum-version = "3.21"
6767
minimum-version = "0.5.1"
68-
sdist.include = [".git", "vendor/llama.cpp/*"]
68+
sdist.include = [".ggml_build_number", "vendor/llama.cpp/*"]
6969

7070
[tool.scikit-build.metadata.version]
7171
provider = "scikit_build_core.metadata.regex"

0 commit comments

Comments
 (0)