diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3d68edd..5fcc1b9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v3 @@ -42,7 +42,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.10' - name: Install black run: | diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ac10550 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,105 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +version = "0.7.2" +authors = [ + {"name"= "Davide Setti"}, +] +description = "Django Group-based roles" +name = "django-group-role" +requires-python = ">=3.10" +dependencies = [ + "django>=3.2,<5.1", +] +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Framework :: Django", + "Framework :: Django :: 3.2", + "Framework :: Django :: 4.0", + "Framework :: Django :: 4.1", + "Framework :: Django :: 4.2", + "Framework :: Django :: 5.0", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + "Intended Audience :: Developers", +] +dynamic = ["readme"] + + +[project.optional-dependencies] +tests = [ + "coverage[toml]", + "pytest", + "pytest-django", + "pytest-cov", + "django-guardian~=2.4.0", +] + +[project.urls] +"Homepage" = "https://github.com/certego/django-group-role" +"Bug Tracker" = "https://github.com/certego/django-group-role/issues" + + +[tool.setuptools] +packages = ["django_group_role"] + +[tool.setuptools.dynamic] +readme = {file = ["README.md"]} + +[tool.coverage.run] +omit = [ + "*/migrations/*", + # do not check for templates + "*/templates/*", + # skip statics + "*/static/*", + "*/apps.py", +] + +branch = true + +source = [ + "django_group_role", +] + +[tool.pytest] +DJANGO_SETTINGS_MODULE = "tests.example_project.settings" + +[tool.tox] +envlist = [ + "py{310}-django32", + "py{310,311,312}-django{40,41,42,50,master}", +] + +[tool.tox.gh] +python = [ + "3.12 = py312", + "3.11 = py311", + "3.10 = py310", +] + +[tool.tox.testenv] +change_dir = "tests" +package = "editable-legacy" +extras = "tests" +whitelist_externals = "py.test" +commands = "py.test" +deps= [ + "pytest", + "pytest-cov", + "pytest-django", + "django-guardian~=2.4.0", + "django32: Django>=3.2,<3.3", + "django32: Django>=3.2,<3.3", + "django40: Django>=4.0,<4.1", + "django41: Django>=4.1,<4.2", + "django42: Django>=4.2,<4.3", + "django50: Django>=5.0a,<5.1", + "djangomaster: https://github.com/django/django/archive/main.tar.gz", +] \ No newline at end of file diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index e13d39f..0000000 --- a/setup.cfg +++ /dev/null @@ -1,97 +0,0 @@ -[metadata] -name = django-group-role -version = 0.7.1 -author = Davide Setti -description = Django Group-based roles -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/certego/django-group-role -project_urls = - Bug Tracker = https://github.com/certego/django-group-role/issues -classifiers = - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Framework :: Django - Framework :: Django :: 3.2 - Framework :: Django :: 4.0 - Framework :: Django :: 4.1 - Framework :: Django :: 4.2 - Framework :: Django :: 5.0 - License :: OSI Approved :: Apache Software License - Operating System :: OS Independent - Intended Audience :: Developers - -[options] -packages = find: -python_requires = >=3.7 -install_requires = - Django>=3.2 - -tests_require = - pytest - pytest-django - pytest-cov - django-guardian~=2.4.0 - -[options.packages.find] -exclude = tests - -[aliases] -test=pytest - -[coverage:run] -omit = - */migrations/* - # do not check for templates - */templates/* - # skip statics - */static/* - */apps.py - -branch = true - -source = - django_group_role - -[tool:pytest] -DJANGO_SETTINGS_MODULE = tests.example_project.settings - -[tox:tox] -envlist = - py{37,38,39,310}-django32 - py{38,39,310,311,312}-django{40,41,42} - py{310,311,312}-django{50,master} - -[gh] -python = - 3.12 = py312 - 3.11 = py311 - 3.10 = py310 - 3.9 = py39 - 3.8 = py38 - 3.7 = py37 - -[testenv] -change_dir = tests -package = editable-legacy -extras = tests -whitelist_externals = py.test -commands = py.test -deps= - pytest - pytest-cov - pytest-django - django-guardian~=2.4.0 - django32: Django>=3.2,<3.3 - django32: Django>=3.2,<3.3 - django40: Django>=4.0,<4.1 - django41: Django>=4.1,<4.2 - django42: Django>=4.2,<4.3 - django50: Django>=5.0a,<5.1 - djangomaster: https://github.com/django/django/archive/main.tar.gz diff --git a/setup.py b/setup.py deleted file mode 100644 index c823345..0000000 --- a/setup.py +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env python -from setuptools import setup - -setup()