diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 670bc76..03feb0a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/setup.py b/setup.py index 08ddaa0..ca733e5 100644 --- a/setup.py +++ b/setup.py @@ -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'}" )