Skip to content

Commit

Permalink
Fix py_minor_version check in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
calebsyring committed Mar 27, 2024
1 parent 6da7aa1 commit 96ee346
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
# Keep Django installation last in order to surface version conflicts.
run: |
python -m pip install --upgrade pip
python -m pip install django==${{ matrix.django-version }}
python -m pip install -r requirements.txt
python -m pip install -r test_requirements.txt
python -m pip install -e .
python -m pip install django==${{ matrix.django-version }}
- name: Run Tests
run: |
pytest
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# We are intending to keep up to date with the supported Django versions.
# For the official support, please visit:
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
if py_minor_version := sys.version_info[1] in [8, 9, 10, 11]:
if (py_minor_version := sys.version_info.minor) in [8, 9, 10, 11]:
django_python_version_install = (
f"Django>=4.0,<{'6' if py_minor_version >= 10 else '5'}"
)
Expand Down

0 comments on commit 96ee346

Please sign in to comment.