runtests.sh already bootstrapped the virtualenv with `uv sync` when uv
was present, but exited with an error when it was not. Fall back to
`python3 -m venv .venv && .venv/bin/pip install -e .` so the suite is
self-bootstrapping on systems that have only a stock Python 3 install.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1934945 13f79535-47bb-0310-9956-
ffa450edef68
if command -v uv >/dev/null 2>&1; then
echo "runtests.sh: .venv not found; running 'uv sync' to create it..." >&2
uv sync
+ elif command -v python3 >/dev/null 2>&1; then
+ echo "runtests.sh: .venv not found; creating it with python3 + pip..." >&2
+ python3 -m venv .venv
+ .venv/bin/pip install --quiet -e .
else
- echo "runtests.sh: ERROR: $PYTEST not found and 'uv' is not installed." >&2
- echo " Create the environment with one of:" >&2
- echo " uv sync" >&2
- echo " python3 -m venv .venv && .venv/bin/pip install pytest httpx" >&2
+ echo "runtests.sh: ERROR: $PYTEST not found and neither 'uv' nor 'python3' is installed." >&2
exit 1
fi
fi