Skip to content

Commit da68c05

Browse files
committed
✨ default_python_version
1 parent 8e06200 commit da68c05

File tree

8 files changed

+18
-10
lines changed

8 files changed

+18
-10
lines changed

cookiecutter.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
"full_name": "Justin Flannery",
99
"email": "[email protected]",
1010
"github_username": "juftin",
11+
"default_python_version": [
12+
"3.11",
13+
"3.10",
14+
"3.9",
15+
"3.8"
16+
],
1117
"default_branch": ["main", "master"],
1218
"license": ["MIT", "Apache-2.0", "GPL-3.0", "UNLICENSED"],
1319
"development_status": [

{{cookiecutter.repo_name}}/.github/workflows/docker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Python
2424
uses: actions/setup-python@v4
2525
with:
26-
python-version: "3.11"
26+
python-version: "{{ cookiecutter.default_python_version }}"
2727
- name: Install Dependencies
2828
run: |
2929
python -m pip install --upgrade pip

{{cookiecutter.repo_name}}/.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
uses: actions/checkout@v4
1313
with:
1414
fetch-depth: 0
15-
- name: Set up Python Environment 3.11
15+
- name: Set up Python Environment
1616
uses: actions/setup-python@v4
1717
with:
18-
python-version: 3.11
18+
python-version: "{{ cookiecutter.default_python_version }}"
1919
- name: Install Python Dependencies
2020
run: |
2121
python -m pip install --upgrade pip

{{cookiecutter.repo_name}}/.github/workflows/publish.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publishing
33
on:
44
release:
55
types:
6-
- created
6+
- published
77

88
jobs:
99

@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Python
2121
uses: actions/setup-python@v4
2222
with:
23-
python-version: "3.11"
23+
python-version: "{{ cookiecutter.default_python_version }}"
2424
- name: Install Hatch
2525
run: |
2626
python -m pip install --upgrade pip
@@ -47,7 +47,7 @@ jobs:
4747
- name: Set up Python
4848
uses: actions/setup-python@v4
4949
with:
50-
python-version: "3.11"
50+
python-version: "{{ cookiecutter.default_python_version }}"
5151
- name: Install Hatch
5252
run: |
5353
python -m pip install --upgrade pip

{{cookiecutter.repo_name}}/.github/workflows/release.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
permissions:
1414
contents: write
1515
issues: write
16+
pull-requests: write
1617
steps:
1718
- name: Check out the repository
1819
uses: actions/checkout@v4
@@ -24,7 +25,7 @@ jobs:
2425
- name: Set up Python
2526
uses: actions/setup-python@v4
2627
with:
27-
python-version: "3.11"
28+
python-version: "{{ cookiecutter.default_python_version }}"
2829
- name: Install Hatch
2930
run: |
3031
python -m pip install --upgrade pip
@@ -55,7 +56,7 @@ jobs:
5556
- name: Set up Python Environment
5657
uses: actions/setup-python@v4
5758
with:
58-
python-version: "3.11"
59+
python-version: "{{ cookiecutter.default_python_version }}"
5960
- name: Install Hatch
6061
run: |
6162
python -m pip install --upgrade pip

{{cookiecutter.repo_name}}/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.11-slim
1+
FROM python:{{ cookiecutter.default_python_version }}-slim
22

33
MAINTAINER {{ cookiecutter.full_name }} <{{ cookiecutter.email }}>
44

{{cookiecutter.repo_name}}/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ post-install-commands = [
7676
pre-install-commands = [
7777
"pip install -q -r requirements.txt --no-deps"
7878
]
79+
python = "{{ cookiecutter.default_python_version }}"
7980
type = "virtual"
8081

8182
[tool.hatch.envs.default.scripts]

{{cookiecutter.repo_name}}/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.11
2+
# This file is autogenerated by pip-compile with Python {{ cookiecutter.default_python_version }}
33
# by the following command:
44
#
55
# pip-compile --generate-hashes --output-file=requirements.txt

0 commit comments

Comments
 (0)