If I add the following error to meson.build:
error('!!!!!!!!!!!! Wrong Cython version !!!!!!!!!!!!!!!!!!!')
Then if there is no existing build directory spin test would call meson setup and show the error message:
$ rm -r build build-install/
$ spin test
Invoking `build` prior to running tests:
$ meson setup build --prefix=/usr
The Meson build system
Version: 1.8.2
...
meson.build:32:0: ERROR: Problem encountered: !!!!!!!!!!!! Wrong Cython version !!!!!!!!!!!!!!!!!!!
A full log can be found at /stuff/current/active/python-flint/build/meson-logs/meson-log.txt
Traceback (most recent call last):
File "/.../.venv/lib/python3.13/site-packages/spin/cmds/meson.py", line 388, in build
raise RuntimeError(
"Meson configuration failed; please try `spin build` again with the `--clean` flag."
)
RuntimeError: Meson configuration failed; please try `spin build` again with the `--clean` flag.
If you suspect this is a bug in `spin`, please file a report at:
https://github.com/scientific-python/spin
including the above traceback and the following information:
spin: 0.18, package: python-flint
Aborting.
If I instead do spin run then the configuration error from meson.build is not displayed:
$ rm -r build build-install/
$ spin run -- pytest
$ meson setup build --prefix=/usr
Traceback (most recent call last):
File "/.../.venv/lib/python3.13/site-packages/spin/cmds/meson.py", line 388, in build
raise RuntimeError(
"Meson configuration failed; please try `spin build` again with the `--clean` flag."
)
RuntimeError: Meson configuration failed; please try `spin build` again with the `--clean` flag.
If you suspect this is a bug in `spin`, please file a report at:
https://github.com/scientific-python/spin
including the above traceback and the following information:
spin: 0.18, package: python-flint
Aborting.
It would be better if this also showed the meson setup output and especially the useful error message "Wrong Cython version".
If I add the following error to meson.build:
Then if there is no existing build directory
spin testwould callmeson setupand show the error message:If I instead do
spin runthen the configuration error from meson.build is not displayed:It would be better if this also showed the meson setup output and especially the useful error message "Wrong Cython version".