diff --git a/README.md b/README.md index 23213e2..98c2780 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This package contains [type stubs](https://www.python.org/dev/peps/pep-0561/) an ## Installation ```bash -pip install django-stubs +pip install django-stubs[compatible-mypy] ``` To make mypy aware of the plugin, you need to add diff --git a/requirements.txt b/requirements.txt index 411fbf7..00588b5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ pytest==7.1.2 pytest-mypy-plugins==1.9.3 psycopg2-binary -e ./django_stubs_ext --e . +-e .[compatible-mypy] # Overrides: mypy==0.960 diff --git a/setup.py b/setup.py index 7ed868d..cc8c4a6 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ with open("README.md") as f: readme = f.read() dependencies = [ - "mypy>=0.930,<0.970", + "mypy>=0.930", "django", "django-stubs-ext>=0.4.0", "tomli", @@ -30,6 +30,10 @@ dependencies = [ "types-PyYAML", ] +extras_require = { + "compatible-mypy": ["mypy>=0.930,<0.970"], +} + setup( name="django-stubs", version="1.11.1", @@ -43,6 +47,7 @@ setup( py_modules=[], python_requires=">=3.7", install_requires=dependencies, + extras_require=extras_require, packages=["django-stubs", *find_packages(exclude=["scripts"])], package_data={ "django-stubs": find_stub_files("django-stubs"),