diff --git a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml index 7567c5ae2..2c3d7bcb1 100644 --- a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml +++ b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml @@ -15,7 +15,9 @@ keywords = [ ] classifiers = [ "Intended Audience :: Developers", +{%- if cookiecutter.license == "Apache-2.0" %} "License :: OSI Approved :: Apache Software License", +{%- endif %} "Operating System :: OS Independent", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -23,7 +25,9 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] -license = "Apache-2.0" +{%- if cookiecutter.license != "None" %} +license = "{{cookiecutter.license}}" +{%- endif %} license-files = [ "LICENSE" ] requires-python = ">=3.9" dependencies = [ diff --git a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml index ba30048aa..557236993 100644 --- a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml +++ b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml @@ -18,7 +18,9 @@ keywords = [ ] classifiers = [ "Intended Audience :: Developers", +{%- if cookiecutter.license == "Apache-2.0" %} "License :: OSI Approved :: Apache Software License", +{%- endif %} "Operating System :: OS Independent", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -26,7 +28,9 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] -license = "Apache-2.0" +{%- if cookiecutter.license != "None" %} +license = "{{cookiecutter.license}}" +{%- endif %} license-files = [ "LICENSE" ] requires-python = ">=3.9" dependencies = [ diff --git a/cookiecutter/target-template/{{cookiecutter.target_id}}/pyproject.toml b/cookiecutter/target-template/{{cookiecutter.target_id}}/pyproject.toml index 17b5bbea8..512da771f 100644 --- a/cookiecutter/target-template/{{cookiecutter.target_id}}/pyproject.toml +++ b/cookiecutter/target-template/{{cookiecutter.target_id}}/pyproject.toml @@ -14,7 +14,9 @@ keywords = [ ] classifiers = [ "Intended Audience :: Developers", +{%- if cookiecutter.license == "Apache-2.0" %} "License :: OSI Approved :: Apache Software License", +{%- endif %} "Operating System :: OS Independent", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -22,7 +24,9 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] -license = "Apache-2.0" +{%- if cookiecutter.license != "None" %} +license = "{{cookiecutter.license}}" +{%- endif %} license-files = [ "LICENSE" ] requires-python = ">=3.9" dependencies = [ diff --git a/e2e-tests/cookiecutters/tap-no-license.json b/e2e-tests/cookiecutters/tap-no-license.json new file mode 100644 index 000000000..611a6fff9 --- /dev/null +++ b/e2e-tests/cookiecutters/tap-no-license.json @@ -0,0 +1,18 @@ +{ + "cookiecutter": { + "source_name": "AutomaticTestTap", + "admin_name": "Automatic Tester", + "admin_email": "auto.tester@example.com", + "tap_id": "tap-no-license", + "library_name": "tap_no_license", + "variant": "None (Skip)", + "stream_type": "REST", + "auth_method": "Basic Auth", + "include_ci_files": "None (Skip)", + "faker_extra": false, + "license": "None", + "ide": "VSCode", + "_template": "../tap-template/", + "_output_dir": "." + } +}