hatchling better error message for missing build hook
Author: gaborbernatCreated Jan 30, 2024Updated Jul 14, 2026
Currently, this is the error message:
[2024-01-30T05:01:48.201Z] File "/tmp/pip-build-env-1oyn1dg3/overlay/lib/python3.11/site-packages/hatchling/builders/hooks/custom.py", line 33, in __new__
[2024-01-30T05:01:48.201Z] raise OSError(message)
[2024-01-30T05:01:48.201Z] OSError: Build script does not exist: hatch_build.pyIt would be nice if the message contains the path is looking into, and what files are found there. This is especially in the CI failures would be very helpful.
OSError: Build script does not exist: hatch_build.py inside tmp/pip-build-env-1oyn1dg3/magic found pyproject.toml, src, testsSource: pypa/hatch