diff --git a/CHANGES.rst b/CHANGES.rst index 0b23cf4..e8ac9d7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ Changelog ********* +Dev +=== + + - Add support for Django 4.1 + 2.1 === diff --git a/Dockerfile b/Dockerfile index 18cf27b..39ef763 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,18 @@ FROM andreyfedoseev/django-static-precompiler:18.04 -RUN apt-get update && \ - apt-get install -y \ +ARG DEBIAN_FRONTEND=noninteractive +ENV TZ=Etc/UTC +RUN apt update && \ + apt install software-properties-common -y && \ + add-apt-repository ppa:deadsnakes/ppa -y && \ + apt install -y \ python3.6-dev \ python3.8-dev \ + python3.9-dev \ + python3.9-distutils \ + python3.10-dev \ + python3.10-distutils \ + python3.11-dev \ + python3.11-distutils \ python3-pip \ sqlite3 RUN mkdir /app diff --git a/Makefile b/Makefile index c91de06..d860301 100644 --- a/Makefile +++ b/Makefile @@ -1,26 +1,26 @@ all: - docker-compose build + docker compose build shell: - docker-compose run --rm app /bin/bash + docker compose run --rm app /bin/bash test: - docker-compose run --rm app tox + docker compose run --rm app tox upload: python setup.py sdist upload check-flake8: - docker-compose run --rm app flake8 + docker compose run --rm app flake8 check-black: - docker-compose run --rm app black --check ./static_precompiler + docker compose run --rm app black --check ./static_precompiler apply-black: - docker-compose run --rm app black ./static_precompiler + docker compose run --rm app black ./static_precompiler check-isort: - docker-compose run --rm app isort --check ./static_precompiler + docker compose run --rm app isort --check ./static_precompiler apply-isort: - docker-compose run --rm app isort ./static_precompiler + docker compose run --rm app isort ./static_precompiler diff --git a/requirements-test.txt b/requirements-test.txt index e2ed447..a71f708 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,8 +1,8 @@ -pytest<4 -pytest-django==3.1.2 +pytest==6.2.5 +pytest-django==4.5.2 pretend watchdog libsass coverage -pytest-cov==2.5.1 +pytest-cov==4.0.0 tox diff --git a/static_precompiler/management/commands/compilestatic.py b/static_precompiler/management/commands/compilestatic.py index ead6c32..13c3422 100644 --- a/static_precompiler/management/commands/compilestatic.py +++ b/static_precompiler/management/commands/compilestatic.py @@ -83,7 +83,7 @@ class Command(django.core.management.base.BaseCommand): help = "Compile static files." - requires_system_checks = False + requires_system_checks = [] def add_arguments(self, parser): for argument, parameters in ARGUMENTS: @@ -129,9 +129,5 @@ def handle(self, **options): watch_dirs(scanned_dirs, verbosity) -if django.VERSION < (1, 8): - import optparse - - Command.option_list = django.core.management.base.NoArgsCommand.option_list + tuple( - optparse.make_option(argument, **argument_parameters) for argument, argument_parameters in ARGUMENTS - ) +if django.VERSION < (3, 2): + Command.requires_system_checks = False diff --git a/tox.ini b/tox.ini index 73aa0d1..588c7a2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,22 +1,18 @@ [tox] envlist = - py36-django20, - py36-django21, py36-django22, - py36-django30, - py36-django31, - py38-django40 - + py38-django32, + py39-django40 + py310-django41 + py311-django41 [testenv] passenv = GEM_PATH deps = -rrequirements-test.txt - django20: Django>=2.0,<2.1 - django21: Django>=2.1,<2.2 django22: Django>=2.2,<3.0 - django30: Django>=3.0,<3.1 - django31: Django>=3.1,<4 + django32: Django>=3.2,<4 django40: Django>=4.0,<4.1 + django41: Django>=4.1,<4.2 commands = py.test static_precompiler --cov static_precompiler --cov-report xml --cov-append setenv = PYTHONPATH = {toxinidir}