Skip to content

Commit

Permalink
cookiecutter: Add python_version as an argument
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Dec 6, 2023
1 parent 875d298 commit 9e4b2b2
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions cookiecutter-django/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"project_slug": "{{ cookiecutter.project_name|lower()|replace(' ', '-')|trim() }}",
"database_name": "{{ cookiecutter.project_slug|lower()|replace(' ', '_')|replace('-', '_')|trim() }}",
"application_name": "{{ cookiecutter.project_slug|lower()|replace(' ', '_')|replace('-', '_')|trim() }}",
"python_version": "3.11",
"use_fathom": "y",
"_copy_without_render": [
".github/workflows/*.yml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '{{ cookiecutter.python_version }}'
cache: pip
cache-dependency-path: '**/requirements*.txt'
- run: pip install -r requirements.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '{{ cookiecutter.python_version }}'
cache: pip
cache-dependency-path: '**/requirements*.txt'
- name: Install translate-toolkit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
token: ${{ secrets.PAT || github.token }}
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '{{ cookiecutter.python_version }}'
cache: pip
cache-dependency-path: '**/requirements*.txt'
- id: changed-files
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11
FROM python:{{ cookiecutter.python_version }}

RUN apt-get update && apt-get install -y --no-install-recommends \
gettext \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11 as build-stage
FROM python:{{ cookiecutter.python_version }} as build-stage

COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python {{ cookiecutter.python_version }}
# by the following command:
#
# pip-compile
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python {{ cookiecutter.python_version }}
# by the following command:
#
# pip-compile requirements_dev.in
Expand Down

0 comments on commit 9e4b2b2

Please sign in to comment.