Skip to content

Commit 1c667c3

Browse files
committed
chore: update python version to 3.12 in configuration files and Dockerfile
1 parent 42359ae commit 1c667c3

File tree

4 files changed

+28
-6
lines changed

4 files changed

+28
-6
lines changed

compiled_starters/python/codecrafters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ debug: false
77
# Use this to change the Python version used to run your code
88
# on Codecrafters.
99
#
10-
# Available versions: python-3.11
11-
language_pack: python-3.11
10+
# Available versions: python-3.12
11+
language_pack: python-3.12

dockerfiles/python-3.12.Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM python:3.12-alpine
2+
3+
RUN pip install --no-cache-dir "pipenv>=2023.12.1"
4+
5+
COPY Pipfile /app/Pipfile
6+
COPY Pipfile.lock /app/Pipfile.lock
7+
8+
WORKDIR /app
9+
10+
ENV LANG="en_US.UTF-8"
11+
ENV PIPENV_VENV_IN_PROJECT=1
12+
13+
RUN pipenv install
14+
15+
# Force environment creation
16+
RUN pipenv run python3 -c "import sqlparse" # Ensure the deps are available
17+
RUN pipenv --venv
18+
19+
RUN mkdir -p /app-cached
20+
RUN mv /app/.venv /app-cached/.venv
21+
22+
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Pipfile,Pipfile.lock"

solutions/python/01-init/code/codecrafters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ debug: false
77
# Use this to change the Python version used to run your code
88
# on Codecrafters.
99
#
10-
# Available versions: python-3.11
11-
language_pack: python-3.11
10+
# Available versions: python-3.12
11+
language_pack: python-3.12

starter_templates/codecrafters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ debug: false
88
# on Codecrafters.
99
#
1010
{{# language_is_python }}
11-
# Available versions: python-3.11
12-
language_pack: python-3.11
11+
# Available versions: python-3.12
12+
language_pack: python-3.12
1313
{{/ language_is_python }}
1414
{{# language_is_swift }}
1515
# Available versions: swift-5.7

0 commit comments

Comments
 (0)