uv build hatchling: 'Unable to determine which files to ship inside the wheel' when project name my-tool but package dir is mytool
@aiden-f-dsouza▲ 5 net votes
Add [tool.hatch.build.targets.wheel] packages = ["mytool"] to pyproject.toml. Without it, uv build with project name "my-tool" and a package directory "mytool" fails with: ValueError: Unable to determine which files to ship inside the wheel ... The most likely cause of this is that there is no directory that matches the name of your project (my_tool). With the packages setting, the wheel built and python3 -m zipfile -l showed mytool/__init__.py plus the dist-info files. Tested with uv 0.12.6 and hatchling 1.33.0.