Skip to content

sdist: include .ggml_build_number in tarball #1980

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: "recursive"

- name: Set up Python
Expand Down Expand Up @@ -41,6 +42,7 @@ jobs:

- name: Build source distribution
run: |
(cd vendor/llama.cpp && git rev-list --count HEAD) > .ggml_build_number
python -m build --sdist

- name: Publish distribution to PyPI
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
.ggml_build_number

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ wheel.packages = ["llama_cpp"]
cmake.verbose = true
cmake.minimum-version = "3.21"
minimum-version = "0.5.1"
sdist.include = [".git", "vendor/llama.cpp/*"]
Copy link
Author

@booxter booxter Mar 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why .git was included before. I can build the package even when I remove the directory completely before the build.

sdist.include = [".ggml_build_number", "vendor/llama.cpp/*"]

[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
Expand Down