configure: run python tests under uv run.
What changed, and why it matters
This commit changes the build configuration script so that Python version and pytest checks are run inside a 'uv run' environment. The author says the old checks were 'misleading' because they could report results from a Python/pytest installation that is not the one actually used by the project. There is no security fix here—just making the build setup more accurate.
No security action needed. Treat as a normal build-system maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The configure script’s default_python() and default_pytest() helpers now invoke ‘uv run $p –version’ and ‘uv run which $exe’ / ‘uv run $1 -c …’ instead of calling python/pytest directly. This ensures the detected interpreter and test runner match the project’s uv-managed environment. No vulnerability is patched; the change is a build-system correctness improvement.
Changed components
configure script (build configuration)Inspect captured patch +4 / −4
diff --git a/configure b/configure
index 260738b2..bead274a 100755
--- a/configure
+++ b/configure
@@ -78,7 +78,7 @@ default_python()
PYTHON_BINS="python3 python"
for p in $PYTHON_BINS; do
if [ "$(which $p)" != "" ] ; then
- if $p --version 2>&1 | grep -q "Python 3."; then
+ if uv run $p --version 2>&1 | grep -q "Python 3."; then
echo "$p"
return
fi
@@ -116,14 +116,14 @@ default_pytest()
# want to only call which on the executable
exe=$(echo "$p" | awk '{print $1}')
# shellcheck disable=SC2086
- if [ "$(which $exe)" != "" ] ; then
- "$p" --version 2>&1 | grep -q "pytest" || continue
+ if [ "$(uv run which $exe)" != "" ] ; then
+ uv run "$p" --version 2>&1 | grep -q "pytest" || continue
echo "$p"
return
fi
done
- if $1 -c "import pytest" 2>/dev/null; then
+ if uv run $1 -c "import pytest" 2>/dev/null; then
echo "$1 -m pytest"
return
fi
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.