Skip to content

Commit b80f50b

Browse files
Change license.file to license-files + SPDX-compliance (#528)
I encountered this issue when making a release astro-informatics/sleplet#451. Also, make `BSD-3` SPDX-compliant. --------- Co-authored-by: Matt Graham <[email protected]>
1 parent 96a9324 commit b80f50b

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

cookiecutter.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"github_owner": "{{cookiecutter.author_given_names.lower().replace(' ', '-')}}-{{cookiecutter.author_family_names.lower().replace(' ', '-')}}",
1212
"min_python_version": ["3.11", "3.12", "3.13"],
1313
"max_python_version": ["3.13", "3.12", "3.11"],
14-
"license": ["MIT", "BSD-3", "GPL-3.0"],
14+
"license": ["MIT", "BSD-3-Clause", "GPL-3.0"],
1515
"funder": "",
1616
"__repo_name": "{{cookiecutter.github_owner}}/{{cookiecutter.project_slug}}",
1717
"__repo_url": "https://github.com/{{cookiecutter.__repo_name}}",

tests/data/test_package_generation/pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ dynamic = [
2626
]
2727
keywords = [
2828
]
29+
license = "MIT"
30+
license-files = [
31+
"LICENSE.md",
32+
]
2933
name = "cookiecutter-test"
3034
optional-dependencies = {dev = [
3135
"build",
@@ -46,7 +50,6 @@ optional-dependencies = {dev = [
4650
]}
4751
readme = "README.md"
4852
requires-python = ">=3.11"
49-
license.file = "LICENSE.md"
5053
urls.homepage = "https://github.com/test-user/cookiecutter-test"
5154

5255
[tool.coverage]

{{cookiecutter.project_slug}}/LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
2323
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2424
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2525

26-
{%- elif cookiecutter.license == "BSD-3" -%}
26+
{%- elif cookiecutter.license == "BSD-3-Clause" -%}
2727

2828
Copyright (c) {% now 'utc', '%Y' %}, {{cookiecutter.author_given_names}}
2929
{{cookiecutter.author_family_names}} All rights reserved.

{{cookiecutter.project_slug}}/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
[documentation-link]: {{cookiecutter.__repo_url}}/actions/workflows/docs.yml
1616
{%- if cookiecutter.license == "MIT" %}
1717
[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg
18-
{%- elif cookiecutter.license == "BSD-3" %}
18+
{%- elif cookiecutter.license == "BSD-3-Clause" %}
1919
[license-badge]: https://img.shields.io/badge/License-BSD_3--Clause-blue.svg
2020
{%- elif cookiecutter.license == "GPL-3.0" %}
2121
[license-badge]: https://img.shields.io/badge/License-GPLv3-blue.svg

{{cookiecutter.project_slug}}/pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ dynamic = [
2929
]
3030
keywords = [
3131
]
32+
license = "{{cookiecutter.license}}"
33+
license-files = [
34+
"LICENSE.md",
35+
]
3236
name = "{{cookiecutter.project_slug}}"
3337
optional-dependencies = {dev = [
3438
"build",
@@ -49,7 +53,6 @@ optional-dependencies = {dev = [
4953
]}
5054
readme = "README.md"
5155
requires-python = ">={{cookiecutter.min_python_version}}"
52-
license.file = "LICENSE.md"
5356
urls.homepage = "{{cookiecutter.__repo_url}}"
5457

5558
[tool.coverage]

0 commit comments

Comments
 (0)