Skip to content

Commit 6c8c725

Browse files
committed
Update python-package.yml
1 parent 7637392 commit 6c8c725

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/python-package.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,25 @@ jobs:
2828
- name: Install dependencies
2929
run: |
3030
python -m pip install --upgrade pip
31-
python -m pip install "flake8>=5,<6" pytest
31+
32+
python -m pip install pytest
3233
pip install -r requirements.txt
34+
35+
if [ "${{ matrix.os }}" == "windows-latest" ]; then
36+
FOR /F "tokens=1,2 delims=," %%G IN ('python -c "import sys; print(sys.version_info[0:2])"') DO (
37+
IF "%%G"=="3" IF "%%H"=="7" (
38+
pip install "flake8>=5,<6"
39+
) ELSE (
40+
pip install flake8
41+
)
42+
)
43+
else
44+
if [[ $(python -c "import sys; print(sys.version_info[0:2])") == "(3, 7)" ]]; then
45+
pip install "flake8>=5,<6"
46+
else
47+
pip install flake8
48+
fi
49+
fi
3350
- name: Install the package locally
3451
run: pip install -e .
3552
- name: Lint with flake8

0 commit comments

Comments
 (0)