diff --git a/CHANGELOG.md b/CHANGELOG.md index 55117537..09e27b6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ ### Changed +* copyright owner is asked in all profiles [#629](https://github.com/NLeSC/python-template/pull/629) +* license files includes year and copyright owner information [#629](https://github.com/NLeSC/python-template/pull/629) + ### Removed ## [0.6.0] diff --git a/copier/questions/essential.yml b/copier/questions/essential.yml index 30db60a1..d57838c7 100644 --- a/copier/questions/essential.yml +++ b/copier/questions/essential.yml @@ -43,3 +43,11 @@ license: value: GNULesserv3 Other (add your own license): value: Other +copyright_holder: + type: str + default: "{{ full_name }}" + help: "Who is the copyright holder (default: full name)?" + validator: >- + {% if not copyright_holder %} + This field cannot be empty as it will be used in content of the generated files. + {% endif %} diff --git a/copier/questions/package_details.yml b/copier/questions/package_details.yml index a4c147b4..a163d554 100644 --- a/copier/questions/package_details.yml +++ b/copier/questions/package_details.yml @@ -35,14 +35,6 @@ email: {% if not (email | regex_search('([A-Za-z0-9]+[.-_])*[A-Za-z0-9]+@[A-Za-z0-9-]+(\.[A-Z|a-z]{2,})+')) %} Please enter a valid email address {% endif %} -copyright_holder: - type: str - default: "{{ full_name }}" - help: "Who is the copyright holder (default: full name)?" - validator: >- - {% if not copyright_holder %} - This field cannot be empty as it will be used in content of the generated files. - {% endif %} # computed fields diff --git a/template/{% if license == 'Apachev2' %}LICENSE{% endif %}.jinja b/template/{% if license == 'Apachev2' %}LICENSE{% endif %}.jinja index 0183c52a..7d423b82 100644 --- a/template/{% if license == 'Apachev2' %}LICENSE{% endif %}.jinja +++ b/template/{% if license == 'Apachev2' %}LICENSE{% endif %}.jinja @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyy] [name of copyright owner] + Copyright {{ '%Y' | strftime }} {{ copyright_holder }} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/template/NOTICE.jinja b/template/{% if license == 'Apachev2' %}NOTICE{% endif %}.jinja similarity index 100% rename from template/NOTICE.jinja rename to template/{% if license == 'Apachev2' %}NOTICE{% endif %}.jinja diff --git a/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja b/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja index f288702d..c0f825cd 100644 --- a/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja +++ b/template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright (C) + Copyright (C) {{ '%Y' | strftime }} {{ copyright_holder }} This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Copyright (C) + Copyright (C) {{ '%Y' | strftime }} {{ copyright_holder }} This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/template/{% if license == 'Other' %}LICENSE{% endif %}.jinja b/template/{% if license == 'Other' %}LICENSE{% endif %}.jinja index 8716c7ae..df35cc43 100644 --- a/template/{% if license == 'Other' %}LICENSE{% endif %}.jinja +++ b/template/{% if license == 'Other' %}LICENSE{% endif %}.jinja @@ -1 +1 @@ -Add your own license +Copyright (C) {{ '%Y' | strftime }} {{ copyright_holder }}