infra: use python version from pyproject.toml
This commit is contained in:
10
Makefile
10
Makefile
@@ -6,7 +6,7 @@
|
||||
CORE_DIR = brain
|
||||
IMAGE_NAME = agent_media
|
||||
# renovate: datasource=docker depName=python
|
||||
PYTHON_VERSION = 3.12.7
|
||||
PYTHON_VERSION = $(shell grep "python" $(CORE_DIR)/pyproject.toml | head -n 1 | sed -E 's/.*[=<>^~"]+ *([0-9]+\.[0-9]+(\.[0-9]+)?).*/\1/')
|
||||
PYTHON_VERSION_SHORT = $(shell echo $(PYTHON_VERSION) | cut -d. -f1,2)
|
||||
# Change to 'uv' when ready.
|
||||
RUNNER ?= poetry
|
||||
@@ -45,7 +45,7 @@ T = \033[36m
|
||||
R = \033[0m
|
||||
|
||||
# --- TARGETS ---
|
||||
.PHONY: add build build-test check-docker check-runner clean coverage down format help init-dotenv install install-hooks lint logs major minor patch prune ps restart run shell test up update _check_branch _ci-dump-config _ci-run-tests _push_tag
|
||||
.PHONY: add build build-test check-docker check-runner clean coverage down format help init-dotenv install install-hooks lint logs major minor patch prune ps python-version restart run shell test up update _check_branch _ci-dump-config _ci-run-tests _push_tag
|
||||
|
||||
# Catch-all for args
|
||||
%:
|
||||
@@ -207,6 +207,12 @@ ps: check-docker
|
||||
@echo "$(T)📋 Container status:$(R)"
|
||||
@$(COMPOSE_CMD) ps
|
||||
|
||||
python-version:
|
||||
@echo "🔍 Reading pyproject.toml..."
|
||||
@echo "✅ Python version : $(PYTHON_VERSION)"
|
||||
@echo "ℹ️ Sera utilisé pour : FROM python:$(PYTHON_VERSION)-slim"
|
||||
|
||||
|
||||
restart: check-docker
|
||||
@echo "$(T)🔄 Restarting containers...$(R)"
|
||||
$(COMPOSE_CMD) restart
|
||||
|
||||
@@ -7,7 +7,7 @@ readme = "README.md"
|
||||
package-mode = false
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.12"
|
||||
python = "==3.12.3"
|
||||
python-dotenv = "^1.0.0"
|
||||
requests = "^2.32.5"
|
||||
fastapi = "^0.121.1"
|
||||
|
||||
Reference in New Issue
Block a user