Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
"""Cookiecutter hook that runs after template generation."""
import json
import shutil
import stat
Expand Down
13 changes: 13 additions & 0 deletions hooks/pre_gen_project.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""Cookiecutter hook that runs before template generation."""


ESCAPED_JINJA_SETUP: str = """
{%- set min_minor = cookiecutter.min_python_version.split('.')[1] | int %}
{%- set max_minor = cookiecutter.max_python_version.split('.')[1] | int %}

{{ cookiecutter.update({
"_min_python_version_minor_int": min_minor,
"_max_python_version_minor_int": max_minor,
"python_versions": ["3." + (i|string) for i in range(min_minor, max_minor + 1)]
}) }}
"""
7 changes: 6 additions & 1 deletion {{cookiecutter.project_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ keywords = [
"{{cookiecutter.project_name.replace('_', '-')}}",
]
classifiers = [
"Programming Language :: Python :: {{cookiecutter.min_python_version}}",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
{%- for version in cookiecutter.python_versions %}
"Programming Language :: Python :: {{ version }}",
{%- endfor %}
"{{ cookiecutter.development_status }}"
]
dependencies = [
"loguru>=0.7.3",
Expand Down