From 8d188d775af338d862284c2dbe0c70a22b329eee Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Mon, 30 Oct 2023 12:03:07 +0200 Subject: [PATCH] Move setup.cfg/setuptools to pyproject.toml --- pyproject.toml | 59 +++++++++++++++++++++++++++++++++++++++++++++++--- setup.cfg | 54 --------------------------------------------- 2 files changed, 56 insertions(+), 57 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index e99073c2..c82f711a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,65 @@ [build-system] requires = [ - "setuptools>=45.0", - # sync with setup.cfg until we discard non-pep-517/518 + "setuptools>=61.0.0", "setuptools-scm[toml]>=5.0.0", ] build-backend = "setuptools.build_meta" +[project] +name = "pytest-django" +description = "A Django plugin for pytest." +readme = "README.rst" +requires-python = ">=3.8" +dynamic = ["version"] +authors = [ + { name = "Andreas Pelme", email = "andreas@pelme.se" }, +] +maintainers = [ + { name = "Andreas Pelme", email = "andreas@pelme.se" }, +] +license = {text = "BSD-3-Clause"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Framework :: Django", + "Framework :: Django :: 3.2", + "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.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development :: Testing", +] +dependencies = [ + "pytest>=7.0.0", +] +[project.optional-dependencies] +docs = [ + "sphinx", + "sphinx_rtd_theme", +] +testing = [ + "Django", + "django-configurations>=2.0", +] +[project.urls] +Documentation = "https://pytest-django.readthedocs.io/" +Repository = "https://github.com/pytest-dev/pytest-django" +Changelog = "https://pytest-django.readthedocs.io/en/latest/changelog.html" +[project.entry-points.pytest11] +django = "pytest_django.plugin" + +[tool.setuptools] +packages = ["pytest_django"] +[tool.setuptools.package-data] +pytest_django = ["py.typed"] + [tool.setuptools_scm] write_to = "pytest_django/_version.py" @@ -55,7 +109,6 @@ exclude_lines = [ ] [tool.ruff] -target-version = "py38" line-length = 99 extend-exclude = [ "pytest_django/_version.py", diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 7195dead..00000000 --- a/setup.cfg +++ /dev/null @@ -1,54 +0,0 @@ -[metadata] -name = pytest-django -description = A Django plugin for pytest. -long_description = file: README.rst -long_description_content_type = text/x-rst -author = Andreas Pelme -author_email = andreas@pelme.se -maintainer = Andreas Pelme -maintainer_email = andreas@pelme.se -url = https://pytest-django.readthedocs.io/ -license = BSD-3-Clause -license_files = LICENSE -classifiers = - Development Status :: 5 - Production/Stable - Framework :: Django - Framework :: Django :: 3.2 - 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.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: Implementation :: PyPy - Topic :: Software Development :: Testing -project_urls = - Source=https://github.com/pytest-dev/pytest-django - Changelog=https://pytest-django.readthedocs.io/en/latest/changelog.html - -[options] -packages = pytest_django -python_requires = >=3.8 -setup_requires = setuptools_scm>=5.0.0 -install_requires = pytest>=7.0.0 -zip_safe = no - -[options.entry_points] -pytest11 = - django = pytest_django.plugin - -[options.extras_require] -docs = - sphinx - sphinx_rtd_theme -testing = - Django - django-configurations>=2.0 - -[options.package_data] -pytest_django = py.typed