Skip to content

Commit 914efb0

Browse files
committed
Only use pygame pre-release on Python 3.11
Works around pygame/pygame#3572
1 parent d8676ff commit 914efb0

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/python-test.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,16 @@ jobs:
3737
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3838
- name: Check with mypy
3939
run: |
40-
# --pre needed for Python 3.11 which doesn't have wheels (and may not be
41-
# fully supported) in version 2.1.2. Once 2.1.3 is released the --pre
42-
# can be removed.
43-
# Version pin to 2.1.3-dev4 needed for Python 3.7 due to https://github.com/pygame/pygame/issues/3572
44-
pip install --pre pygame==2.1.3-dev4 # Needed for examples
40+
if [[ "${{ matrix.python-version }}" = "3.11" ]]
41+
then
42+
# --pre needed for Python 3.11 which doesn't have wheels (and may not
43+
# be fully supported) in version 2.1.2. Once 2.1.3 is released this
44+
# can be removed. Due to https://github.com/pygame/pygame/issues/3572
45+
# we can't apply this for all Python versions.
46+
pip install --pre pygame # Needed for examples
47+
else
48+
pip install pygame # Needed for examples
49+
fi
4550
mypy pythonosc examples
4651
- name: Test with pytest
4752
run: |

0 commit comments

Comments
 (0)