Skip to content

Commit 1316006

Browse files
committed
Use only MIT license to reduce maintenance burden
1 parent e312105 commit 1316006

File tree

7 files changed

+3
-134
lines changed

7 files changed

+3
-134
lines changed

cookiecutter.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"full_name": "Audrey Roy Greenfeld",
2+
"full_name": "Audrey M. Roy Greenfeld",
33
"email": "[email protected]",
44
"github_username": "audreyfeldroy",
55
"project_name": "Python Boilerplate",
@@ -8,6 +8,5 @@
88
"pypi_username": "{{ cookiecutter.github_username }}",
99
"version": "0.1.0",
1010
"create_author_file": "y",
11-
"open_source_license": ["MIT license", "BSD license", "ISC license", "Apache Software License 2.0", "GNU General Public License v3", "GNU Affero General Public License", "Not open source"],
1211
"__gh_slug": "{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}"
1312
}

docs/prompts.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ The following appear in various parts of your generated project:
2020
The following package configuration options set up different features for your project:
2121

2222
- **create_author_file**: Whether to create an authors file
23-
- **open_source_license**: Choose a [license](https://choosealicense.com/). Options: [1. MIT License, 2. BSD license, 3. ISC license, 4. Apache Software License 2.0, 5. GNU General Public License v3, 6. Not open source]

hooks/post_gen_project.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,3 @@
55
if "{{ cookiecutter.create_author_file }}" != "y":
66
pathlib.Path("AUTHORS.rst").unlink()
77
pathlib.Path("docs", "authors.rst").unlink()
8-
9-
if "Not open source" == "{{ cookiecutter.open_source_license }}":
10-
pathlib.Path("LICENSE").unlink()

tests/test_bake_project.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,13 @@ def test_bake_selecting_license(cookies):
143143
}
144144
for license, target_string in license_strings.items():
145145
with bake_in_temp_dir(
146-
cookies, extra_context={"open_source_license": license}
147146
) as result:
148147
assert target_string in result.project.join("LICENSE").read()
149148
assert license in result.project.join("pyproject.toml").read()
150149

151150

152151
def test_bake_not_open_source(cookies):
153152
with bake_in_temp_dir(
154-
cookies, extra_context={"open_source_license": "Not open source"}
155153
) as result:
156154
found_toplevel_files = [f.basename for f in result.project.listdir()]
157155
assert "pyproject.toml" in found_toplevel_files

{{cookiecutter.project_slug}}/LICENSE

Lines changed: 0 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{% if cookiecutter.open_source_license == 'MIT license' -%}
21
MIT License
32

43
Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
@@ -20,126 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2019
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2120
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2221
SOFTWARE.
23-
{% elif cookiecutter.open_source_license == 'BSD license' %}
24-
25-
BSD License
26-
27-
Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
28-
All rights reserved.
29-
30-
Redistribution and use in source and binary forms, with or without modification,
31-
are permitted provided that the following conditions are met:
32-
33-
* Redistributions of source code must retain the above copyright notice, this
34-
list of conditions and the following disclaimer.
35-
36-
* Redistributions in binary form must reproduce the above copyright notice, this
37-
list of conditions and the following disclaimer in the documentation and/or
38-
other materials provided with the distribution.
39-
40-
* Neither the name of the copyright holder nor the names of its
41-
contributors may be used to endorse or promote products derived from this
42-
software without specific prior written permission.
43-
44-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
45-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
46-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
47-
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
48-
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
49-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
50-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
51-
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
52-
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
53-
OF THE POSSIBILITY OF SUCH DAMAGE.
54-
{% elif cookiecutter.open_source_license == 'ISC license' -%}
55-
ISC License
56-
57-
Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
58-
59-
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
60-
61-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
62-
{% elif cookiecutter.open_source_license == 'Apache Software License 2.0' -%}
63-
Apache Software License 2.0
64-
65-
Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
66-
67-
Licensed under the Apache License, Version 2.0 (the "License");
68-
you may not use this file except in compliance with the License.
69-
You may obtain a copy of the License at
70-
71-
http://www.apache.org/licenses/LICENSE-2.0
72-
73-
Unless required by applicable law or agreed to in writing, software
74-
distributed under the License is distributed on an "AS IS" BASIS,
75-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
76-
See the License for the specific language governing permissions and
77-
limitations under the License.
78-
{% elif cookiecutter.open_source_license == 'GNU General Public License v3' -%}
79-
GNU GENERAL PUBLIC LICENSE
80-
Version 3, 29 June 2007
81-
82-
{{ cookiecutter.project_short_description }}
83-
Copyright (C) {% now 'local', '%Y' %} {{ cookiecutter.full_name }}
84-
85-
This program is free software: you can redistribute it and/or modify
86-
it under the terms of the GNU General Public License as published by
87-
the Free Software Foundation, either version 3 of the License, or
88-
(at your option) any later version.
89-
90-
This program is distributed in the hope that it will be useful,
91-
but WITHOUT ANY WARRANTY; without even the implied warranty of
92-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
93-
GNU General Public License for more details.
94-
95-
You should have received a copy of the GNU General Public License
96-
along with this program. If not, see <http://www.gnu.org/licenses/>.
97-
98-
Also add information on how to contact you by electronic and paper mail.
99-
100-
You should also get your employer (if you work as a programmer) or school,
101-
if any, to sign a "copyright disclaimer" for the program, if necessary.
102-
For more information on this, and how to apply and follow the GNU GPL, see
103-
<http://www.gnu.org/licenses/>.
104-
105-
The GNU General Public License does not permit incorporating your program
106-
into proprietary programs. If your program is a subroutine library, you
107-
may consider it more useful to permit linking proprietary applications with
108-
the library. If this is what you want to do, use the GNU Lesser General
109-
Public License instead of this License. But first, please read
110-
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
111-
{% elif cookiecutter.open_source_license == 'GNU Affero General Public License' -%}
112-
GNU AFFERO GENERAL PUBLIC LICENSE
113-
Version 3, 19 November 2007
114-
115-
{{ cookiecutter.project_short_description }}
116-
Copyright (C) {% now 'local', '%Y' %} {{ cookiecutter.full_name }}
117-
118-
This program is free software: you can redistribute it and/or modify
119-
it under the terms of the GNU Affero General Public License as published by
120-
the Free Software Foundation, either version 3 of the License, or
121-
(at your option) any later version.
122-
123-
This program is distributed in the hope that it will be useful,
124-
but WITHOUT ANY WARRANTY; without even the implied warranty of
125-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
126-
GNU Affero General Public License for more details.
127-
128-
You should have received a copy of the GNU Affero General Public License
129-
along with this program. If not, see <https://www.gnu.org/licenses/>.
130-
131-
Also add information on how to contact you by electronic and paper mail.
132-
133-
If your software can interact with users remotely through a computer
134-
network, you should also make sure that it provides a way for users to
135-
get its source. For example, if your program is a web application, its
136-
interface could display a "Source" link that leads users to an archive
137-
of the code. There are many ways you could offer source, and different
138-
solutions will be better for different programs; see section 13 for the
139-
specific requirements.
140-
141-
You should also get your employer (if you work as a programmer) or school,
142-
if any, to sign a "copyright disclaimer" for the program, if necessary.
143-
For more information on this, and how to apply and follow the GNU GPL, see
144-
<http://www.gnu.org/licenses/>.
145-
{% endif %}

{{cookiecutter.project_slug}}/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{{ cookiecutter.project_short_description }}
99

1010
{% if is_open_source %}
11-
* Free software: {{ cookiecutter.open_source_license }}
11+
* Free software: MIT License
1212
* Documentation: https://{{ cookiecutter.project_slug | replace("_", "-") }}.readthedocs.io.
1313
{% endif %}
1414

{{cookiecutter.project_slug}}/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ maintainers = [
1515
classifiers = [
1616

1717
]
18-
license = {text = "{{cookiecutter.open_source_license}}"}
18+
license = {text = "MIT"}
1919
dependencies = [
2020
"typer"
2121
]

0 commit comments

Comments
 (0)