Adding support for packaging

pull/3/head
Drew Bednar 1 year ago
parent 06dc9fd451
commit 5544977c96

@ -1,3 +1,13 @@
# cookiecutter-basic # cookiecutter-basic
A basic cookiecutter template for most Androiddrew style repos. A basic cookiecutter template for most Androiddrew style repos.
## Licenses
Within a `pyproject.toml` file the license section expects the string identifier as determined by https://spdx.org/licenses/. This project supports a small subset of these licenses.
Example:
```
[project]
license = {text = "MIT"}
```

@ -7,11 +7,11 @@
"initial_dependencies": "", "initial_dependencies": "",
"description": "An templated Python project", "description": "An templated Python project",
"open_source_license": [ "open_source_license": [
"MIT license", "MIT",
"BSD license", "BSD-3-Clause",
"ISC license", "ISC",
"Apache Software License 2.0", "Apache-2.0",
"GNU General Public License v3", "GPL-3.0-or-later",
"Not open source" "Not open source"
] ]
} }

@ -1,4 +1,4 @@
{% if cookiecutter.open_source_license == 'MIT license' %} {% if cookiecutter.open_source_license == 'MIT' %}
MIT License MIT License
Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }} Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
@ -8,7 +8,7 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{% elif cookiecutter.open_source_license == 'BSD license' %} {% elif cookiecutter.open_source_license == 'BSD-3-Clause' %}
BSD License BSD License
Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }} Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
@ -46,7 +46,7 @@ Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
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. 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.
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. 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.
{% elif cookiecutter.open_source_license == 'Apache Software License 2.0' %} {% elif cookiecutter.open_source_license == 'Apache-2.0' %}
Apache Software License 2.0 Apache Software License 2.0
Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }} Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
@ -62,7 +62,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
{% elif cookiecutter.open_source_license == 'GNU General Public License v3' %} {% elif cookiecutter.open_source_license == 'GPL-3.0-or-later' %}
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007 Version 3, 29 June 2007

@ -1,8 +1,9 @@
-c ./requirements.txt -c ./requirements.txt
black black
build
invoke invoke
isort isort<=5.12.0
pip-tools pip-tools
pre-commit pre-commit
pytest pytest

@ -1,3 +1,27 @@
[project]
name = "{{ cookiecutter.project_slug }}"
version = "0.1.0"
authors = [
{name = "{{ cookiecutter.full_name }}", email = "{{ cookiecutter.email }}"},
]
description = "{{ cookiecutter.description }}"
requires-python = ">=3.10"
{% if cookiecutter.open_source_license != 'Not open source' -%}
license = {text = "{{ cookiecutter.open_source_license }}"}
{% endif -%}
classifiers = [
"Programming Language :: Python :: 3",
]
dynamic = ["readme", "dependencies"]
[tool.setuptools.dynamic]
readme = {file = ["README.md"], content-type = "text/markdown"}
dependencies = {file = ["requirements.txt"]}
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.isort] [tool.isort]
profile = "black" profile = "black"
line_length = 120 line_length = 120

Loading…
Cancel
Save