From b77c288b7637ec67566685b624fe1f7bafb6af87 Mon Sep 17 00:00:00 2001 From: Facundo Tuesca Date: Wed, 23 Apr 2025 17:25:48 +0200 Subject: [PATCH] Update license fields in pyproject.toml Signed-off-by: Facundo Tuesca --- {{cookiecutter.project_slug}}/pyproject.toml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/{{cookiecutter.project_slug}}/pyproject.toml b/{{cookiecutter.project_slug}}/pyproject.toml index 8231f0f..b364bd1 100644 --- a/{{cookiecutter.project_slug}}/pyproject.toml +++ b/{{cookiecutter.project_slug}}/pyproject.toml @@ -3,19 +3,21 @@ name = "{{ cookiecutter.project_slug }}" dynamic = ["version"] description = "{{ cookiecutter.project_description }}" readme = "README.md" -license = { file = "LICENSE" } +license-files = ["LICENSE"] + +{%- if cookiecutter.license == "Apache 2.0" %} +license = "Apache-2.0" +{%- elif cookiecutter.license == "AGPL v3" %} +license = "AGPL-3.0-or-later" +{%- elif cookiecutter.license == "Proprietary" %} +license = "LicenseRef-Proprietary-License" +{%- endif %} + authors = [ { name = "{{ cookiecutter.author_name }}", email = "{{ cookiecutter.author_email }}" }, ] classifiers = [ "Programming Language :: Python :: 3", - {%- if cookiecutter.license == "Apache 2.0" %} - "License :: OSI Approved :: Apache Software License", - {%- elif cookiecutter.license == "AGPL v3" %} - "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", - {%- elif cookiecutter.license == "Proprietary" %} - "License :: Other/Proprietary License", - {%- endif %} ] dependencies = [] requires-python = ">=3.9"