File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,12 +64,20 @@ jobs:
6464 - name : Build and Test
6565 shell : bash
6666 run : |
67- # Create a fresh virtual environment to avoid permission errors on self-hosted
68- python3 -m venv .venv
67+ # Use 'python' if 'python3' isn't available (common on Windows)
68+ if command -v python3 &>/dev/null; then PY=python3; else PY=python; fi
6969
70- # Activate venv (Syntax works for Bash on Mac/Linux/Windows git-bash)
71- source .venv/bin/activate
70+ # Create venv
71+ $PY -m venv .venv
7272
73+ # Activate venv (Handle Windows 'Scripts' vs Linux/Mac 'bin')
74+ if [ -f ".venv/bin/activate" ]; then
75+ source .venv/bin/activate
76+ else
77+ source .venv/Scripts/activate
78+ fi
79+
80+ # Now run commands inside the verified venv
7381 python -m pip install --upgrade pip build
7482 python -m build
7583 pip install dist/*.whl
You can’t perform that action at this time.
0 commit comments