Skip to content

Misc. bug: pyproject.toml omits conversion/ package — installed entry points fail with ModuleNotFoundError #23740

@tu-madre-es-puta

Description

@tu-madre-es-puta

Name and Version

b9334 (2026-05-26) — also verified against current master (fff0e0e)

Operating systems

Linux

Which llama.cpp modules do you know to be affected?

Python/Bash scripts

Command line

uv tool install 'llama-cpp-scripts @ git+https://github.com/ggml-org/llama.cpp.git'
llama-convert-hf-to-gguf --help

Problem description & steps to reproduce

Since #17114 (commit cc7200b, 2026-05-15), both convert_hf_to_gguf.py and convert_lora_to_gguf.py import from the newly created conversion/ package directory. The [tool.poetry] section of pyproject.toml, however, still only includes top-level .py files:

[tool.poetry]
packages = [{ include = "*.py", from = "." }]

The glob *.py does not match directories. Consequently, any installation method that builds via the poetry-core backend (pip install, uv tool install, poetry install) produces a wheel lacking the conversion/ package altogether; every entry-point script then fails at import time.

Running the scripts directly from within the source tree works, as Python resolves conversion/ from the working directory — which is why the breakage went unnoticed.

To reproduce:

uv tool install 'llama-cpp-scripts @ git+https://github.com/ggml-org/llama.cpp.git'
llama-convert-hf-to-gguf --help   # fails

Proposed fix — add conversion to the packages list:

 [tool.poetry]
-packages = [{ include = "*.py", from = "." }]
+packages = [
+    { include = "*.py", from = "." },
+    { include = "conversion", from = "." },
+]

Verified locally: after applying this one-line change and reinstalling, all four entry points (llama-convert-hf-to-gguf, llama-convert-lora-to-gguf, llama-convert-llama-ggml-to-gguf, llama-ggml-vk-generate-shaders) work correctly.

Note: This is the same root cause reported in #23171, which was closed on 2026-05-17 without a fix being merged. The pyproject.toml on current master remains unchanged.

First Bad Commit

cc7200b — "Refactor: convert_hf_to_gguf.py (#17114)"

Relevant log output

Logs
$ llama-convert-hf-to-gguf --help
Traceback (most recent call last):
  File "/home/user/.local/bin/llama-convert-hf-to-gguf", line 4, in <module>
    from convert_hf_to_gguf import main
  File "/home/user/.local/share/uv/tools/llama-cpp-scripts/lib/python3.13/site-packages/convert_hf_to_gguf.py", line 18, in <module>
    from conversion import (
    ...<8 lines>...
    )
ModuleNotFoundError: No module named 'conversion'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions