From 6019f1d9784d45ae386ba50daaa4cd26909d5520 Mon Sep 17 00:00:00 2001 From: Mathieu Dupuy Date: Thu, 27 Jul 2023 15:56:07 +0200 Subject: [PATCH] migrate setup.cfg to pyproject.toml --- pyproject.toml | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 77 ------------------------------------------- 2 files changed, 89 insertions(+), 77 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..640ce3271 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,89 @@ +[build-system] +requires = ["setuptools>=61.2"] +build-backend = "setuptools.build_meta" + +[project] +name = "djangorestframework" +version = "3.14.0" +authors = [{name = "Tom Christie", email = "tom@tomchristie.com"}] +license = {text = "BSD"} +description = "Web APIs for Django, made easy." +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Framework :: Django", + "Framework :: Django :: 3.0", + "Framework :: Django :: 3.1", + "Framework :: Django :: 3.2", + "Framework :: Django :: 4.0", + "Framework :: Django :: 4.1", + "Framework :: Django :: 4.2", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "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", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Internet :: WWW/HTTP", +] +requires-python = ">=3.6" +dependencies = [ + "django>=3.0", + 'backports.zoneinfo;python_version<"3.9"', +] + +[project.readme] +file = "README.md" +content-type = "text/markdown" + +[project.urls] +Homepage = "https://www.django-rest-framework.org/" +Funding = "https://fund.django-rest-framework.org/topics/funding/" +Source = "https://github.com/encode/django-rest-framework" +Changelog = "https://www.django-rest-framework.org/community/release-notes/" + +[tool.setuptools] +zip-safe = false +include-package-data = true +license-files = ["LICENSE.md"] + +[tool.setuptools.packages.find] +exclude = ["tests*"] +namespaces = false + +[tool.pytest.ini_options] +addopts = "--tb=short --strict-markers -ra" +testspath = "tests" +filterwarnings = ["ignore:CoreAPI compatibility is deprecated*:rest_framework.RemovedInDRF317Warning"] + +[tool.flake8] +ignore = "E501,W503,W504" +banned-modules = "json = use from rest_framework.utils import json!" + +[tool.isort] +skip = [".tox"] +atomic = true +multi_line_output = 5 +extra_standard_library = ["types"] +known_third_party = ["pytest", "_pytest", "django", "pytz", "uritemplate"] +known_first_party = ["rest_framework", "tests"] + +[tool.coverage.run] +# NOTE: source is ignored with pytest-cov (but uses the same). +source = ["."] +include = ["rest_framework/*", "tests/*"] +branch = true + +[tool.coverage.report] +include = ["rest_framework/*", "tests/*"] +exclude_lines = [ + "pragma: no cover", + "raise NotImplementedError", +] diff --git a/setup.cfg b/setup.cfg index 9cadd9505..aebdf5362 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,80 +1,3 @@ -[metadata] -license_files = LICENSE.md -name = djangorestframework -version = 3.14.0 -author = Tom Christie -author_email = tom@tomchristie.com -license = BSD -description = Web APIs for Django, made easy. -url = https://www.django-rest-framework.org/ -long_description = file: README.md -long_description_content_type = text/markdown -classifiers = - Development Status :: 5 - Production/Stable - Environment :: Web Environment - Framework :: Django - Framework :: Django :: 3.0 - Framework :: Django :: 3.1 - Framework :: Django :: 3.2 - Framework :: Django :: 4.0 - Framework :: Django :: 4.1 - Framework :: Django :: 4.2 - Intended Audience :: Developers - License :: OSI Approved :: BSD License - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.6 - 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 - Programming Language :: Python :: 3 :: Only - Topic :: Internet :: WWW/HTTP -project_urls = - Funding = https://fund.django-rest-framework.org/topics/funding/ - Source = https://github.com/encode/django-rest-framework - Changelog = https://www.django-rest-framework.org/community/release-notes/ - -[options] -packages = find: -zip_safe = False -install_requires = - django>=3.0 - backports.zoneinfo;python_version<"3.9" -include_package_data = True -python_requires = >=3.6 - -[options.packages.find] -exclude = tests* - -[tool:pytest] -addopts=--tb=short --strict-markers -ra -testspath = tests -filterwarnings = ignore:CoreAPI compatibility is deprecated*:rest_framework.RemovedInDRF317Warning - [flake8] ignore = E501,W503,W504 banned-modules = json = use from rest_framework.utils import json! - -[isort] -skip=.tox -atomic=true -multi_line_output=5 -extra_standard_library=types -known_third_party=pytest,_pytest,django,pytz,uritemplate -known_first_party=rest_framework,tests - -[coverage:run] -# NOTE: source is ignored with pytest-cov (but uses the same). -source = . -include = rest_framework/*,tests/* -branch = 1 - -[coverage:report] -include = rest_framework/*,tests/* -exclude_lines = - pragma: no cover - raise NotImplementedError