Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAINT: improve error message when meson isn't found
There are several ways that meson may go missing: - a non-isolated build and meson isn't installed - meson executable is specified in pyproject.toml and git submodule is containing it is not initialized (reported as resulting in a confusing error in numpy#26397) - MESON environmnent variable is used by the user and is misspelled The git submodule case was ending with: ``` meson-python: error: Could not find meson version 0.63.3 or newer, found . ``` and after this ends with: ``` meson-python: error: Could not find the specified meson: "vendored-meson/meson/meson.py" ``` If the executable is missing, the build ended with a very long traceback. Changing `FileNotFoundError` to `ConfigError` elides the traceback and clearly reports that the executable wasn't found. Easy to verify with any package with: ``` $ MESON=nonsense python -m build -wnx * Building wheel... meson-python: error: meson executable "nonsense" not found ERROR Backend subproccess exited when trying to invoke build_wheel ```
- Loading branch information