From 15ee26df315020399731c6291d61bef81a3fc5d3 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Wed, 22 Nov 2023 15:14:21 +0200 Subject: [PATCH] move from setup.cfg to pyproject.toml (#115) --- {{cookiecutter.project_name}}/pyproject.toml | 50 ++++++++++++++++++ {{cookiecutter.project_name}}/setup.cfg | 53 -------------------- 2 files changed, 50 insertions(+), 53 deletions(-) delete mode 100644 {{cookiecutter.project_name}}/setup.cfg diff --git a/{{cookiecutter.project_name}}/pyproject.toml b/{{cookiecutter.project_name}}/pyproject.toml index 2276dc0..95a8449 100644 --- a/{{cookiecutter.project_name}}/pyproject.toml +++ b/{{cookiecutter.project_name}}/pyproject.toml @@ -4,6 +4,56 @@ build-backend = "setuptools.build_meta" [tool.setuptools_scm] +[project] +name = "{{ cookiecutter.project_name }}" +description = "{{ cookiecutter.short_description or cookiecutter.friendly_name }}" +readme = "README.rst" +license = {text = "{{ cookiecutter.license }}"} +authors = [{ name = "{{ cookiecutter.author }}", email = "{{ cookiecutter.email }}" }] +classifiers = [ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "{{cookiecutter.development_status}}", +] +requires-python = ">=3.8" +dynamic = ["version"] +dependencies = [] + +[project.urls] +Issues = "https://github.com/{{cookiecutter.github_user}}/{{ cookiecutter.project_name }}/issues" +Source = "https://github.com/{{cookiecutter.github_user}}/{{ cookiecutter.project_name }}" + +[project.optional-dependencies] +{%- if cookiecutter.docs != "False" %} +docs = [ + "mkdocs==1.5.2", + "mkdocs-gen-files==0.5.0", + "mkdocs-material==9.3.1", + "mkdocs-section-index==0.3.6", + "mkdocstrings-python==1.6.3", +] +{%- endif %} +tests = [ + "pytest==7.2.0", + "pytest-sugar==0.9.5", + "pytest-cov==3.0.0", + "pytest-mock==3.8.2", + "mypy==0.971", +] +dev = [ + "{{ cookiecutter.project_name }}[tests]", +{%- if cookiecutter.docs != "False" %} + "{{ cookiecutter.project_name }}[docs]", +{%- endif %} +] + +[tool.setuptools.packages.find] +where = ["src"] +namespaces = false + [tool.pytest.ini_options] addopts = "-ra" diff --git a/{{cookiecutter.project_name}}/setup.cfg b/{{cookiecutter.project_name}}/setup.cfg deleted file mode 100644 index 1754064..0000000 --- a/{{cookiecutter.project_name}}/setup.cfg +++ /dev/null @@ -1,53 +0,0 @@ -[metadata] -description = {{ cookiecutter.short_description or cookiecutter.friendly_name }} -name = {{ cookiecutter.project_name }} -long_description = file: README.rst -long_description_content_type = text/x-rst -license = {{ cookiecutter.license }} -license_file = LICENSE -url = https://github.com/{{cookiecutter.github_user}}/{{ cookiecutter.project_name }} -platforms=any -authors = {{ cookiecutter.author }} -maintainer_email = {{ cookiecutter.email }} -classifiers = - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - {{cookiecutter.development_status}} - -[options] -python_requires = >=3.8 -zip_safe = False -package_dir= - =src -packages = find: -install_requires= - -[options.extras_require] -{%- if cookiecutter.docs != "False" %} -docs = - mkdocs==1.5.2 - mkdocs-gen-files==0.5.0 - mkdocs-material==9.3.1 - mkdocs-section-index==0.3.6 - mkdocstrings-python==1.6.3 -{%- endif %} -tests = - pytest==7.2.0 - pytest-sugar==0.9.5 - pytest-cov==3.0.0 - pytest-mock==3.8.2 - mypy==0.971 -dev = - %(tests)s -{%- if cookiecutter.docs != "False" %} - %(docs)s -{%- endif %} - -[options.packages.find] -exclude = - tests - tests.* -where=src