Rename virtual environment to .venv in build workflow

This commit is contained in:
Jay Lee
2026-05-08 16:02:12 -04:00
committed by GitHub
parent 9dc427c47b
commit 9e6122769a

View File

@@ -506,21 +506,21 @@ jobs:
"${PYTHON}" -VV "${PYTHON}" -VV
"${PYTHON}" -c "import ssl; print(f'Using {ssl.OPENSSL_VERSION}')" "${PYTHON}" -c "import ssl; print(f'Using {ssl.OPENSSL_VERSION}')"
- name: Create and use Python venv - name: Create and use Python .venv
run: | run: |
cd "$GITHUB_WORKSPACE" cd "$GITHUB_WORKSPACE"
curl -o get-pip.py https://bootstrap.pypa.io/get-pip.py curl -o get-pip.py https://bootstrap.pypa.io/get-pip.py
"$PYTHON" get-pip.py "$PYTHON" get-pip.py
"$PYTHON" -m venv venv "$PYTHON" -m venv .venv
"$PYTHON" -m pip install uv "$PYTHON" -m pip install uv
CUTOFF=$(date -d '14 days ago' +%Y-%m-%dT00:00:00Z) CUTOFF=$(date -d '14 days ago' +%Y-%m-%dT00:00:00Z)
if [[ "$RUNNER_OS" == "Windows" ]]; then if [[ "$RUNNER_OS" == "Windows" ]]; then
# pyscard seems to build outside venv but not in it. # pyscard seems to build outside venv but not in it.
# build it so it's cached. # build it so it's cached.
"$PYTHON" -m uv pip install --upgrade pyscard --exclude-newer "$CUTOFF" "$PYTHON" -m uv pip install --upgrade pyscard --exclude-newer "$CUTOFF"
export PYTHON="${GITHUB_WORKSPACE}/venv/scripts/python.exe" export PYTHON="${GITHUB_WORKSPACE}/.venv/scripts/python.exe"
else else
export PYTHON="${GITHUB_WORKSPACE}/venv/bin/python3" export PYTHON="${GITHUB_WORKSPACE}/.venv/bin/python3"
fi fi
"$PYTHON" -m pip install uv "$PYTHON" -m pip install uv
echo "PYTHON=${PYTHON}" >> $GITHUB_ENV echo "PYTHON=${PYTHON}" >> $GITHUB_ENV