[FIX] install nixos : l'amorçage, les en-têtes, les manuels écartés
L'amorçage d'ERPLibre n'atteignait pas NixOS : le Makefile force
« SHELL := /bin/bash », que l'image ne porte pas, et le fournisseur de
Python ne cherche l'interpréteur du système qu'en /usr/bin/pythonX.Y.
Les deux répondent une fois envfs déclaré.
Ce qui n'a pas de roue amont se compile et réclame ses en-têtes : ils sont
liés au profil du système, leurs bibliothèques vont au chargeur, et
pg_config — dérivation à part dans nixpkgs — est nommé. La sortie « doc »
de CPython est écartée : sa construction est un Sphinx de 3 000 pages qui
domine le temps d'installation d'une VM de 4 Go.
--- EN ---
ERPLibre's bootstrap did not reach NixOS: the Makefile forces "SHELL :=
/bin/bash", which the image lacks, and the Python provider only looks for
the system interpreter at /usr/bin/pythonX.Y. Both answer once envfs is
declared.
What has no upstream wheel compiles and demands its headers: they are
linked into the system profile, their libraries reach the loader, and
pg_config — a separate derivation in nixpkgs — is named. CPython's "doc"
output is left out: building it is a 3000-page Sphinx run that dominates
install time on a 4 GB VM.
Assisted-by: Claude Opus 5
2026-09-16 00:42:13 -04:00
|
|
|
# bash, où qu'il soit. « /bin/bash » n'existe pas sur NixOS, où le shell
|
|
|
|
|
# vit dans le store : make s'y arrêtait sur « /bin/bash: No such file or
|
|
|
|
|
# directory » avant d'exécuter la moindre recette, y compris celle qui
|
|
|
|
|
# installe de quoi le créer. Le repli garde le chemin des plateformes qui
|
|
|
|
|
# l'ont, et l'affectation reste immédiate — SHELL est lu à chaque recette.
|
|
|
|
|
SHELL := $(shell command -v bash 2>/dev/null || echo /bin/bash)
|
2025-12-03 05:04:16 -05:00
|
|
|
ERPLIBRE_VERSION := $(strip \
|
|
|
|
|
$(if $(wildcard .erplibre-version),$(shell cat .erplibre-version),) \
|
|
|
|
|
)
|
|
|
|
|
ODOO_VERSION := $(strip \
|
|
|
|
|
$(if $(wildcard .odoo-version),$(shell cat .odoo-version),) \
|
|
|
|
|
)
|
|
|
|
|
LOG_FILE := ./.venv.$(ERPLIBRE_VERSION)/make_test.log
|
2020-09-25 04:32:19 -04:00
|
|
|
#############
|
|
|
|
|
# General #
|
|
|
|
|
#############
|
|
|
|
|
# ALL
|
|
|
|
|
.PHONY: all
|
2025-05-04 00:40:05 -04:00
|
|
|
all: todo
|
2020-09-25 04:32:19 -04:00
|
|
|
|
|
|
|
|
###############
|
|
|
|
|
# Detect OS #
|
|
|
|
|
###############
|
|
|
|
|
# https://stackoverflow.com/questions/714100/os-detecting-makefile
|
|
|
|
|
DETECTED_OS := $(shell uname -s)
|
|
|
|
|
############################
|
|
|
|
|
# Detect browser command #
|
|
|
|
|
############################
|
|
|
|
|
#BROWSER := ls
|
|
|
|
|
ifeq ($(DETECTED_OS),Darwin)
|
|
|
|
|
BROWSER := open
|
|
|
|
|
else
|
|
|
|
|
ifeq ($(DETECTED_OS),Linux)
|
|
|
|
|
BROWSER := xdg-open
|
|
|
|
|
else
|
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
|
BROWSER := start
|
|
|
|
|
else
|
|
|
|
|
BROWSER := ls
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
2025-05-02 03:41:04 -04:00
|
|
|
# Include all Makefile
|
|
|
|
|
-include ./conf/make.code_generator.Makefile
|
2025-11-04 23:24:43 -05:00
|
|
|
-include ./conf/make.robotlibre.Makefile
|
2025-05-02 03:41:04 -04:00
|
|
|
-include ./conf/make.erplibre.Makefile
|
|
|
|
|
-include ./conf/make.database.Makefile
|
|
|
|
|
-include ./conf/make.docker.Makefile
|
|
|
|
|
-include ./conf/make.documentation.Makefile
|
|
|
|
|
-include ./conf/make.image_db.Makefile
|
|
|
|
|
-include ./conf/make.installation.Makefile
|
2025-07-14 03:44:48 -04:00
|
|
|
-include ./conf/make.installation.poetry.Makefile
|
2025-05-02 03:41:04 -04:00
|
|
|
-include ./conf/make.test.Makefile
|
[ADD] make: add SSH remote deployment targets and todo.py integration
Enable deploying and managing ERPLibre on remote servers via SSH
directly from make and the interactive todo.py CLI, since only
local deployment was previously supported.
- New conf/make.ssh.Makefile with 11 targets: ssh_check, ssh_push,
ssh_install, ssh_run, ssh_stop, ssh_restart, ssh_status, ssh_logs,
ssh_make, ssh_install_systemd, ssh_install_nginx
- Variables: SSH_HOST (required), SSH_USER, SSH_PORT, SSH_KEY,
SSH_PATH, SSH_TARGET, SSH_DOMAIN, SSH_ADMIN_EMAIL
- Execute > Deploy menu extended with 11 SSH options in todo.py
- All strings translated fr/en in todo_i18n.py
Generated by Claude Code 2.1.101 model claude-sonnet-4-6
Co-Authored-By: Mathieu Benoit <mathben@technolibre.ca>
2026-04-10 22:53:07 -04:00
|
|
|
-include ./conf/make.ssh.Makefile
|
2025-05-02 03:41:04 -04:00
|
|
|
-include ./conf/make.todo.Makefile
|
|
|
|
|
|
|
|
|
|
# Include private Makefile
|
2025-08-07 06:28:34 -04:00
|
|
|
-include ./private/make.private.Makefile
|
2025-03-10 02:57:44 -04:00
|
|
|
|
|
|
|
|
# Example for update
|
|
|
|
|
.PHONY: custom_run_example
|
|
|
|
|
custom_run_example:
|
|
|
|
|
./run.sh -d example_prod
|
|
|
|
|
|
|
|
|
|
.PHONY: custom_update_example
|
|
|
|
|
custom_update_example:
|
|
|
|
|
./script/database/db_restore.py --database example_prod --image image_name_to_restore
|
|
|
|
|
./script/addons/update_addons_all.sh example_prod
|
|
|
|
|
./script/addons/update_prod_to_dev.sh example_prod
|
|
|
|
|
|
2021-01-20 06:35:10 -05:00
|
|
|
#########
|
|
|
|
|
# RUN #
|
|
|
|
|
#########
|
|
|
|
|
.PHONY: run
|
|
|
|
|
run:
|
|
|
|
|
echo http://localhost:8069
|
|
|
|
|
echo http://localhost:8069/web/database/manager
|
|
|
|
|
./run.sh
|
|
|
|
|
|
|
|
|
|
.PHONY: run_test
|
|
|
|
|
run_test:
|
|
|
|
|
echo http://localhost:8069
|
|
|
|
|
./run.sh --database test
|
|
|
|
|
|
2022-02-04 14:12:53 -05:00
|
|
|
.PHONY: run_prod_client
|
|
|
|
|
run_prod_client:
|
|
|
|
|
echo http://localhost:8069
|
|
|
|
|
./run.sh --database prod_client
|
|
|
|
|
|
2024-08-25 15:54:24 -04:00
|
|
|
############
|
|
|
|
|
# VERSION #
|
|
|
|
|
############
|
|
|
|
|
.PHONY: version
|
|
|
|
|
version:
|
|
|
|
|
./script/version/update_env_version.py
|
|
|
|
|
|
|
|
|
|
###################
|
|
|
|
|
# Environnement #
|
|
|
|
|
###################
|
|
|
|
|
.PHONY: pyenv_update
|
|
|
|
|
pyenv_update:
|
|
|
|
|
~/.pyenv/bin/pyenv update
|
|
|
|
|
|
[ADD] install: mise as Python provider, pyenv as fallback
mise lays down a precompiled CPython where pyenv builds one: seconds
against one to three minutes, with no -dev package at all. The choice
lives in EL_PYTHON_PROVIDER -- auto, mise or pyenv -- and in a single
file, lib_python_provider.sh. The rest of the repository only knows venv
paths and needs to know none of this.
In auto mode an ALREADY installed interpreter wins, whichever provider put
it there. mise is never installed on its own, "curl | sh" commits too much
for a script to decide -- make install_mise carries that decision.
MISE_PYTHON_COMPILE=false forbids it from quietly compiling: without that
guard it would fall back to pyenv's own engine, giving us the slowness
without the tooling. That is also what stopped gcc from collapsing while
building CPython on a low-memory s390x guest, for nothing.
One real bug falls along the way: a failed venv did not stop the install,
which then went on and failed further down, far from the cause.
--- FR ---
mise pose un CPython précompilé là où pyenv en compile un : des secondes
contre une à trois minutes, et aucun paquet -dev. Le choix vit dans
EL_PYTHON_PROVIDER — auto, mise ou pyenv — et dans un seul fichier,
lib_python_provider.sh. Le reste du dépôt ne connaît que des chemins de
venv et n'a rien à savoir de tout cela.
En mode auto, un interpréteur DÉJÀ posé l'emporte, quel qu'en soit le
fournisseur. mise n'est jamais installé de lui-même, « curl | sh » engage
trop pour qu'un script en décide — make install_mise porte cette décision.
MISE_PYTHON_COMPILE=false lui interdit de compiler en silence : sans ce
garde, il retomberait sur le moteur de pyenv, et nous aurions sa lenteur
sans son outillage. C'est aussi ce qui a évité que gcc s'écroule en
bâtissant CPython sur une VM s390x à faible mémoire, inutilement.
Un vrai défaut tombe au passage : un venv raté n'arrêtait pas
l'installation, qui continuait et échouait plus loin, loin de la cause.
Assisted-by: Claude Opus 5
2026-08-11 22:03:40 -04:00
|
|
|
# mise pose un CPython PRECOMPILE la ou pyenv le compile : quelques secondes
|
|
|
|
|
# contre une a trois minutes, et aucun paquet -dev requis. Volontairement
|
|
|
|
|
# EXPLICITE : « curl | sh » engage, et ce n'est pas a un script d'installation
|
|
|
|
|
# de le decider a la place de l'utilisateur. Une fois mise present,
|
|
|
|
|
# EL_PYTHON_PROVIDER=auto s'en sert tout seul.
|
|
|
|
|
#
|
|
|
|
|
# Pas de binaire s390x publie a ce jour : sur cette architecture, la cible
|
|
|
|
|
# le dit et n'installe rien.
|
[ADD] install: uv to place Python packages, pip as fallback
uv replaces pip where it can: the tools venv and the Poetry bootstrap. The
choice lives in EL_PIP_PROVIDER -- auto, uv or pip -- and in a single
file, lib_pip_provider.sh, on the exact model of the mise/pyenv switch. A
uv failure falls back to pip: it is stricter on metadata and rejects
packages pip accepts.
Three guards. The target always goes through "--python" rather than being
inferred from the active venv: poetry.toml declares a "./.venv" uv would
also look for. Python 3.7, still used by Odoo 12 and 13, stays on pip. And
"uv pip sync" is never used: it would delete pip itself and everything
Poetry laid down.
One bug falls along the way: the idempotence guard aimed at
.venv.erplibre/bin/poetry while Poetry installs into the Odoo venv, so a
successful replay reported failure all the same.
--- FR ---
uv remplace pip là où il le peut : le venv d'outils et l'amorçage de
Poetry. Le choix vit dans EL_PIP_PROVIDER — auto, uv ou pip — et dans un
seul fichier, lib_pip_provider.sh, sur le modèle exact de l'aiguillage
mise/pyenv. Un échec d'uv retombe sur pip : il est plus strict sur les
métadonnées et refuse des paquets que pip accepte.
Trois gardes. La cible passe toujours par « --python » plutôt que d'être
déduite du venv actif : poetry.toml déclare un « ./.venv » qu'uv
chercherait aussi. Python 3.7, encore utilisé par Odoo 12 et 13, reste sur
pip. Et « uv pip sync » n'est jamais employé : il supprimerait pip
lui-même et tout ce que Poetry a posé.
Un défaut tombe au passage : le garde d'idempotence visait
.venv.erplibre/bin/poetry alors que Poetry s'installe dans le venv Odoo,
si bien qu'un rejeu réussi rapportait quand même un échec.
Assisted-by: Claude Opus 5
2026-08-11 23:16:26 -04:00
|
|
|
# uv installe les paquets Python nettement plus vite que pip, et met en cache
|
|
|
|
|
# les roues qu'il CONSTRUIT — ce qui compte la ou rien n'a de roue publiee.
|
|
|
|
|
# Contrairement a mise, uv publie une roue s390x : un « pip install uv » dans
|
|
|
|
|
# le venv d'outils suffit, sans « curl | sh ». Reste EXPLICITE quand meme,
|
|
|
|
|
# comme install_mise : EL_PIP_PROVIDER=auto s'en sert des qu'il est la.
|
|
|
|
|
#
|
|
|
|
|
# Attention a l'attente : « poetry install », qui domine le temps
|
|
|
|
|
# d'installation, n'est PAS accelere — uv ne lit pas poetry.lock.
|
|
|
|
|
.PHONY: install_uv
|
|
|
|
|
install_uv:
|
|
|
|
|
@if command -v uv >/dev/null 2>&1; then \
|
|
|
|
|
echo "uv deja present : $$(uv --version)"; \
|
|
|
|
|
else \
|
|
|
|
|
echo "Installation de uv dans le venv d outils"; \
|
|
|
|
|
./$$(cat conf/python-erplibre-venv | xargs)/bin/pip install uv; \
|
|
|
|
|
echo "uv : ./$$(cat conf/python-erplibre-venv | xargs)/bin/uv"; \
|
|
|
|
|
echo "Ajoutez ce repertoire au PATH, ou installez uv globalement."; \
|
|
|
|
|
fi
|
|
|
|
|
|
[ADD] install: mise as Python provider, pyenv as fallback
mise lays down a precompiled CPython where pyenv builds one: seconds
against one to three minutes, with no -dev package at all. The choice
lives in EL_PYTHON_PROVIDER -- auto, mise or pyenv -- and in a single
file, lib_python_provider.sh. The rest of the repository only knows venv
paths and needs to know none of this.
In auto mode an ALREADY installed interpreter wins, whichever provider put
it there. mise is never installed on its own, "curl | sh" commits too much
for a script to decide -- make install_mise carries that decision.
MISE_PYTHON_COMPILE=false forbids it from quietly compiling: without that
guard it would fall back to pyenv's own engine, giving us the slowness
without the tooling. That is also what stopped gcc from collapsing while
building CPython on a low-memory s390x guest, for nothing.
One real bug falls along the way: a failed venv did not stop the install,
which then went on and failed further down, far from the cause.
--- FR ---
mise pose un CPython précompilé là où pyenv en compile un : des secondes
contre une à trois minutes, et aucun paquet -dev. Le choix vit dans
EL_PYTHON_PROVIDER — auto, mise ou pyenv — et dans un seul fichier,
lib_python_provider.sh. Le reste du dépôt ne connaît que des chemins de
venv et n'a rien à savoir de tout cela.
En mode auto, un interpréteur DÉJÀ posé l'emporte, quel qu'en soit le
fournisseur. mise n'est jamais installé de lui-même, « curl | sh » engage
trop pour qu'un script en décide — make install_mise porte cette décision.
MISE_PYTHON_COMPILE=false lui interdit de compiler en silence : sans ce
garde, il retomberait sur le moteur de pyenv, et nous aurions sa lenteur
sans son outillage. C'est aussi ce qui a évité que gcc s'écroule en
bâtissant CPython sur une VM s390x à faible mémoire, inutilement.
Un vrai défaut tombe au passage : un venv raté n'arrêtait pas
l'installation, qui continuait et échouait plus loin, loin de la cause.
Assisted-by: Claude Opus 5
2026-08-11 22:03:40 -04:00
|
|
|
.PHONY: install_mise
|
|
|
|
|
install_mise:
|
|
|
|
|
@if command -v mise >/dev/null 2>&1; then \
|
|
|
|
|
echo "mise deja present : $$(mise --version)"; \
|
|
|
|
|
elif command -v pacman >/dev/null 2>&1; then \
|
|
|
|
|
sudo pacman -S --needed --noconfirm mise; \
|
|
|
|
|
elif [ "$$(uname -m)" = "s390x" ]; then \
|
|
|
|
|
echo "mise ne publie pas de binaire s390x : on reste sur pyenv."; \
|
|
|
|
|
else \
|
|
|
|
|
echo "Installation de mise depuis https://mise.run"; \
|
|
|
|
|
curl -fsSL https://mise.run | sh; \
|
|
|
|
|
echo "Ajoutez ~/.local/bin a votre PATH, puis relancez l installation."; \
|
|
|
|
|
fi
|
|
|
|
|
|
2021-07-16 04:29:23 -04:00
|
|
|
.PHONY: db_create_db_test
|
2022-01-24 14:00:47 -05:00
|
|
|
db_create_db_test:
|
|
|
|
|
./script/make.sh db_drop_db_test
|
2025-05-04 23:10:34 -04:00
|
|
|
./odoo_bin.sh db --create --database test
|
2021-07-16 04:29:23 -04:00
|
|
|
|
2022-04-20 04:18:26 -04:00
|
|
|
.PHONY: db_clone_test_to_test2
|
|
|
|
|
db_clone_test_to_test2:
|
2025-05-04 23:10:34 -04:00
|
|
|
./odoo_bin.sh db --drop --database test2
|
|
|
|
|
./odoo_bin.sh db --clone --database test2 --from_database test
|
2022-04-20 04:18:26 -04:00
|
|
|
|
2022-01-24 14:00:54 -05:00
|
|
|
.PHONY: db_test_export
|
|
|
|
|
db_test_export:
|
|
|
|
|
./script/database/db_restore.py --database test_website_export
|
|
|
|
|
./script/addons/install_addons_dev.sh test_website_export demo_website_data
|
|
|
|
|
|
2022-04-08 15:41:39 -04:00
|
|
|
#########
|
2021-07-16 00:56:30 -04:00
|
|
|
# tag #
|
2022-04-08 15:41:39 -04:00
|
|
|
#########
|
2021-07-16 00:56:30 -04:00
|
|
|
.PHONY: tag_push_all
|
|
|
|
|
tag_push_all:
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/git/tag_push_all.py
|
2021-07-16 00:56:30 -04:00
|
|
|
|
2021-05-16 17:53:27 -04:00
|
|
|
##############
|
|
|
|
|
# terminal #
|
|
|
|
|
##############
|
|
|
|
|
.PHONY: open_terminal
|
|
|
|
|
open_terminal:
|
|
|
|
|
./script/open_terminal_code_generator.sh
|
|
|
|
|
|
2024-12-20 11:14:30 -05:00
|
|
|
##############
|
|
|
|
|
# selenium #
|
|
|
|
|
##############
|
|
|
|
|
.PHONY: open_selenium
|
|
|
|
|
open_selenium:
|
2025-05-05 04:43:13 -04:00
|
|
|
./.venv.erplibre/bin/python ./script/selenium/web_login.py
|
2024-12-20 11:14:30 -05:00
|
|
|
|
2021-04-11 03:03:51 -04:00
|
|
|
############
|
|
|
|
|
# format #
|
|
|
|
|
############
|
|
|
|
|
.PHONY: format
|
2022-01-24 14:00:47 -05:00
|
|
|
format:
|
2025-10-31 01:10:54 -04:00
|
|
|
./script/maintenance/format_file_to_commit.py
|
|
|
|
|
|
|
|
|
|
.PHONY: format_all
|
|
|
|
|
format_all:
|
[ADD] format : une cible pour test/ et long_test/
Aucune cible ne formatait les tests : « make format_all » couvre script/ et les
six dépôts d'addons, et rien d'autre. Seul « make format » les atteignait, et
seulement ceux qu'un diff signalait, si bien que 75 fichiers sur 210 ne
suivaient aucune norme — de la dérive silencieuse dans un arbre qui sert de
référence au reste. Les tests tournent dans le venv d'outillage : ils suivent
donc ruff, comme script/, et la cible entre dans format_all.
Vérifié : « make -n format_test » nomme bien ruff, et format_all l'inclut.
--- EN ---
No target formatted the tests: "make format_all" covers script/ and the six
addons repositories, nothing else. Only "make format" reached them, and only
those a diff reported, so that 75 files out of 210 followed no standard —
silent drift in a tree the rest takes as reference. The tests run in the
tooling venv: they therefore follow ruff, like script/, and the target joins
format_all.
Checked: "make -n format_test" names ruff, and format_all includes it.
Assisted-by: Claude Opus 5
2026-09-24 13:30:19 -04:00
|
|
|
parallel ::: "./script/make.sh format_code_generator" "./script/make.sh format_code_generator_template" "./script/make.sh format_script" "./script/make.sh format_test" "./script/make.sh format_erplibre_addons" "./script/make.sh format_supported_addons"
|
2021-04-11 03:03:51 -04:00
|
|
|
|
[ADD] format : une cible pour test/ et long_test/
Aucune cible ne formatait les tests : « make format_all » couvre script/ et les
six dépôts d'addons, et rien d'autre. Seul « make format » les atteignait, et
seulement ceux qu'un diff signalait, si bien que 75 fichiers sur 210 ne
suivaient aucune norme — de la dérive silencieuse dans un arbre qui sert de
référence au reste. Les tests tournent dans le venv d'outillage : ils suivent
donc ruff, comme script/, et la cible entre dans format_all.
Vérifié : « make -n format_test » nomme bien ruff, et format_all l'inclut.
--- EN ---
No target formatted the tests: "make format_all" covers script/ and the six
addons repositories, nothing else. Only "make format" reached them, and only
those a diff reported, so that 75 files out of 210 followed no standard —
silent drift in a tree the rest takes as reference. The tests run in the
tooling venv: they therefore follow ruff, like script/, and the target joins
format_all.
Checked: "make -n format_test" names ruff, and format_all includes it.
Assisted-by: Claude Opus 5
2026-09-24 13:30:19 -04:00
|
|
|
# Les dépôts d'addons sont nommés, jamais leur chemin : il dépend du manifeste,
|
|
|
|
|
# et chaque version d'Odoo n'en rapatrie qu'une partie. Voir format_addons.sh.
|
2021-04-11 03:03:51 -04:00
|
|
|
.PHONY: format_code_generator
|
|
|
|
|
format_code_generator:
|
2025-05-05 04:43:13 -04:00
|
|
|
.venv.erplibre/bin/isort --profile black -l 79 ./addons/TechnoLibre_odoo-code-generator/
|
2021-04-11 03:03:51 -04:00
|
|
|
./script/maintenance/black.sh ./addons/TechnoLibre_odoo-code-generator/
|
2022-12-27 22:45:20 -05:00
|
|
|
./script/maintenance/prettier_xml.sh ./addons/TechnoLibre_odoo-code-generator/
|
2021-04-11 03:03:51 -04:00
|
|
|
|
2022-03-30 04:35:55 -04:00
|
|
|
.PHONY: format_erplibre_addons
|
|
|
|
|
format_erplibre_addons:
|
2025-05-05 04:43:13 -04:00
|
|
|
.venv.erplibre/bin/isort --profile black -l 79 ./addons/ERPLibre_erplibre_addons/
|
2022-03-30 04:35:55 -04:00
|
|
|
./script/maintenance/black.sh ./addons/ERPLibre_erplibre_addons/
|
2023-06-15 00:18:45 -04:00
|
|
|
./script/maintenance/prettier_xml.sh ./addons/ERPLibre_erplibre_addons/
|
2025-05-05 04:43:13 -04:00
|
|
|
.venv.erplibre/bin/isort --profile black -l 79 ./addons/ERPLibre_erplibre_theme_addons/
|
2022-03-31 01:10:41 -04:00
|
|
|
./script/maintenance/black.sh ./addons/ERPLibre_erplibre_theme_addons/
|
|
|
|
|
#./script/maintenance/prettier_xml.sh ./addons/ERPLibre_erplibre_theme_addons/
|
2022-03-30 04:35:55 -04:00
|
|
|
|
2022-04-01 04:33:28 -04:00
|
|
|
.PHONY: format_supported_addons
|
|
|
|
|
format_supported_addons:
|
2025-05-05 04:43:13 -04:00
|
|
|
.venv.erplibre/bin/isort --profile black -l 79 ./addons/MathBenTech_erplibre-family-management/
|
2022-04-01 04:33:28 -04:00
|
|
|
./script/maintenance/black.sh ./addons/MathBenTech_erplibre-family-management/
|
|
|
|
|
#./script/maintenance/prettier_xml.sh ./addons/MathBenTech_erplibre-family-management/
|
2025-05-05 04:43:13 -04:00
|
|
|
.venv.erplibre/bin/isort --profile black -l 79 ./addons/MathBenTech_odoo-business-spending-management-quebec-canada/
|
2023-01-23 23:25:47 -05:00
|
|
|
./script/maintenance/black.sh ./addons/MathBenTech_odoo-business-spending-management-quebec-canada/
|
|
|
|
|
#./script/maintenance/prettier_xml.sh ./addons/MathBenTech_erplibre-family-management/
|
2022-04-01 04:33:28 -04:00
|
|
|
|
2021-04-11 03:03:51 -04:00
|
|
|
.PHONY: format_code_generator_template
|
|
|
|
|
format_code_generator_template:
|
2025-05-05 04:43:13 -04:00
|
|
|
.venv.erplibre/bin/isort --profile black -l 79 ./addons/TechnoLibre_odoo-code-generator-template/
|
2021-04-11 03:03:51 -04:00
|
|
|
./script/maintenance/black.sh ./addons/TechnoLibre_odoo-code-generator-template/
|
2021-05-27 01:47:32 -04:00
|
|
|
#./script/maintenance/prettier_xml.sh ./addons/TechnoLibre_odoo-code-generator-template/
|
2021-04-11 03:03:51 -04:00
|
|
|
|
2021-06-27 00:49:00 -04:00
|
|
|
.PHONY: format_script
|
|
|
|
|
format_script:
|
[IMP] format : un formateur par contexte, ruff pour l'outillage
« make format » donnait isort et black à tout fichier Python : la cible py37,
plus petit dénominateur commun de six dépôts d'addons, imposait son style au
code de ce dépôt. Le contexte décide désormais — les modules Odoo gardent isort
et black, le reste passe par ruff, réglé dans .ruff.toml, comme la norme OCA
depuis qu'elle a quitté black. Les dépôts rapatriés sous script/ en sont
écartés, chemin nommé compris. La cible y reste py310 : dès 3.14 ruff écrit
« except A, B: » sans parenthèses, que le python3 des hooks ne sait pas lire.
Vérifié : un fichier reçoit deux normes selon son chemin, et aucun dépôt
rapatrié n'est touché.
--- EN ---
"make format" gave isort and black to every Python file: the py37 target,
lowest common denominator of six addons repositories, imposed its style on this
repository's code. Context now decides — Odoo modules keep isort and black,
everything else goes through ruff, set in .ruff.toml, as the OCA standard does
since it left black. The repositories checked out under script/ are excluded, a
named path included. The target stays py310 there: from 3.14 on, ruff writes
"except A, B:" unparenthesised, which the python3 of the hooks cannot read.
Checked: one file gets two standards by its path, and no checked-out
repository is touched.
Assisted-by: Claude Opus 5
2026-09-24 13:29:11 -04:00
|
|
|
.venv.erplibre/bin/ruff check --select I --fix ./script/
|
|
|
|
|
.venv.erplibre/bin/ruff format ./script/
|
2021-06-27 00:49:00 -04:00
|
|
|
|
[ADD] format : une cible pour test/ et long_test/
Aucune cible ne formatait les tests : « make format_all » couvre script/ et les
six dépôts d'addons, et rien d'autre. Seul « make format » les atteignait, et
seulement ceux qu'un diff signalait, si bien que 75 fichiers sur 210 ne
suivaient aucune norme — de la dérive silencieuse dans un arbre qui sert de
référence au reste. Les tests tournent dans le venv d'outillage : ils suivent
donc ruff, comme script/, et la cible entre dans format_all.
Vérifié : « make -n format_test » nomme bien ruff, et format_all l'inclut.
--- EN ---
No target formatted the tests: "make format_all" covers script/ and the six
addons repositories, nothing else. Only "make format" reached them, and only
those a diff reported, so that 75 files out of 210 followed no standard —
silent drift in a tree the rest takes as reference. The tests run in the
tooling venv: they therefore follow ruff, like script/, and the target joins
format_all.
Checked: "make -n format_test" names ruff, and format_all includes it.
Assisted-by: Claude Opus 5
2026-09-24 13:30:19 -04:00
|
|
|
# Les tests suivent la norme de l'outillage : ils tournent dans le même venv,
|
|
|
|
|
# et rien ne les formatait — seul « make format » les touchait, et seulement
|
|
|
|
|
# s'ils étaient modifiés.
|
|
|
|
|
.PHONY: format_test
|
|
|
|
|
format_test:
|
|
|
|
|
.venv.erplibre/bin/ruff check --select I --fix ./test/ ./long_test/
|
|
|
|
|
.venv.erplibre/bin/ruff format ./test/ ./long_test/
|
|
|
|
|
|
2022-01-24 14:00:47 -05:00
|
|
|
.PHONY: format_script_isort_only
|
|
|
|
|
format_script_isort_only:
|
[IMP] format : un formateur par contexte, ruff pour l'outillage
« make format » donnait isort et black à tout fichier Python : la cible py37,
plus petit dénominateur commun de six dépôts d'addons, imposait son style au
code de ce dépôt. Le contexte décide désormais — les modules Odoo gardent isort
et black, le reste passe par ruff, réglé dans .ruff.toml, comme la norme OCA
depuis qu'elle a quitté black. Les dépôts rapatriés sous script/ en sont
écartés, chemin nommé compris. La cible y reste py310 : dès 3.14 ruff écrit
« except A, B: » sans parenthèses, que le python3 des hooks ne sait pas lire.
Vérifié : un fichier reçoit deux normes selon son chemin, et aucun dépôt
rapatrié n'est touché.
--- EN ---
"make format" gave isort and black to every Python file: the py37 target,
lowest common denominator of six addons repositories, imposed its style on this
repository's code. Context now decides — Odoo modules keep isort and black,
everything else goes through ruff, set in .ruff.toml, as the OCA standard does
since it left black. The repositories checked out under script/ are excluded, a
named path included. The target stays py310 there: from 3.14 on, ruff writes
"except A, B:" unparenthesised, which the python3 of the hooks cannot read.
Checked: one file gets two standards by its path, and no checked-out
repository is touched.
Assisted-by: Claude Opus 5
2026-09-24 13:29:11 -04:00
|
|
|
.venv.erplibre/bin/ruff check --select I --fix ./script/
|
2022-01-24 14:00:47 -05:00
|
|
|
|
|
|
|
|
#########
|
|
|
|
|
# log #
|
|
|
|
|
#########
|
|
|
|
|
.PHONY: log_show_test
|
|
|
|
|
log_show_test:
|
|
|
|
|
vim ${LOG_FILE}
|
|
|
|
|
|
2021-03-16 23:13:41 -04:00
|
|
|
###########
|
|
|
|
|
# clean #
|
|
|
|
|
###########
|
|
|
|
|
.PHONY: clean_code_generator_template
|
|
|
|
|
clean_code_generator_template:
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/git/repo_revert_git_diff_date_from_code_generator.py
|
2021-01-20 06:35:10 -05:00
|
|
|
|
2021-05-27 01:47:32 -04:00
|
|
|
.PHONY: clean_test
|
|
|
|
|
clean_test:
|
|
|
|
|
cd addons/OCA_server-tools; git stash; git clean -fd
|
|
|
|
|
|
2021-01-14 23:45:38 -05:00
|
|
|
##############
|
|
|
|
|
# Git repo #
|
|
|
|
|
##############
|
|
|
|
|
# clear all repo DANGER
|
|
|
|
|
.PHONY: repo_clear_all
|
|
|
|
|
repo_clear_all:
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/git/clean_repo_manifest.sh
|
2021-01-14 23:45:38 -05:00
|
|
|
|
2021-03-13 02:21:45 -05:00
|
|
|
# configure all repo
|
|
|
|
|
.PHONY: repo_configure_all
|
|
|
|
|
repo_configure_all:
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/manifest/update_manifest_local_dev.sh
|
2021-03-13 02:21:45 -05:00
|
|
|
|
2021-02-01 23:57:57 -05:00
|
|
|
# configure only group code_generator
|
|
|
|
|
.PHONY: repo_configure_group_code_generator
|
|
|
|
|
repo_configure_group_code_generator:
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/manifest/update_manifest_local_dev_code_generator.sh
|
2021-02-01 23:57:57 -05:00
|
|
|
|
2021-07-01 03:18:56 -04:00
|
|
|
# Show git status for all repo
|
2021-07-01 00:52:15 -04:00
|
|
|
.PHONY: repo_show_status
|
|
|
|
|
repo_show_status:
|
2025-05-05 04:43:13 -04:00
|
|
|
.venv.erplibre/bin/repo forall -pc "git status -s"
|
2021-07-01 00:52:15 -04:00
|
|
|
|
2025-10-31 01:10:54 -04:00
|
|
|
# Show git stash for all repo
|
|
|
|
|
.PHONY: repo_do_stash
|
|
|
|
|
repo_do_stash:
|
|
|
|
|
.venv.erplibre/bin/repo forall -pc "git stash"
|
|
|
|
|
|
2021-07-16 00:13:05 -04:00
|
|
|
# Show divergence between actual repository and production manifest
|
|
|
|
|
.PHONY: repo_diff_manifest_production
|
|
|
|
|
repo_diff_manifest_production:
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/git/git_show_code_diff_repo_manifest.py
|
2021-07-16 00:13:05 -04:00
|
|
|
|
2021-07-01 03:18:56 -04:00
|
|
|
# Show git diff for all repo from last tag version release
|
|
|
|
|
.PHONY: repo_diff_from_last_version
|
|
|
|
|
repo_diff_from_last_version:
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/git/repo_diff_last_version.sh
|
2021-07-01 03:18:56 -04:00
|
|
|
|
|
|
|
|
# Show git diff statistique for all repo from last tag version release
|
|
|
|
|
.PHONY: repo_diff_stat_from_last_version
|
|
|
|
|
repo_diff_stat_from_last_version:
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/git/repo_diff_stat_last_version.sh
|
2021-07-01 03:18:56 -04:00
|
|
|
|
2021-01-14 23:45:38 -05:00
|
|
|
# change all repo to ssh on all remote
|
|
|
|
|
.PHONY: repo_use_all_ssh
|
|
|
|
|
repo_use_all_ssh:
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/git/git_change_remote_https_to_git.py
|
2021-01-14 23:45:38 -05:00
|
|
|
|
|
|
|
|
# change all repo to https on all remote
|
|
|
|
|
.PHONY: repo_use_all_https
|
|
|
|
|
repo_use_all_https:
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/git/git_change_remote_https_to_git.py --git_to_https
|
2021-01-14 23:45:38 -05:00
|
|
|
|
2021-01-14 16:26:36 -05:00
|
|
|
###################
|
|
|
|
|
# Configuration #
|
|
|
|
|
###################
|
|
|
|
|
# generate new config.conf
|
|
|
|
|
.PHONY: config_install
|
|
|
|
|
config_install:
|
2021-07-21 16:20:25 -04:00
|
|
|
./script/generate_config.sh
|
2021-01-14 16:26:36 -05:00
|
|
|
|
2024-08-25 15:54:24 -04:00
|
|
|
.PHONY: config_update
|
|
|
|
|
config_update:
|
2024-12-02 05:27:57 -05:00
|
|
|
# Need http to configure the file config.conf, or will disable it
|
2024-08-25 15:54:24 -04:00
|
|
|
./run.sh -c config.conf -s --stop-after-init
|
|
|
|
|
|
|
|
|
|
.PHONY: config_update_over_proxy
|
|
|
|
|
config_update_over_proxy:
|
|
|
|
|
./run.sh -c config.conf -s --stop-after-init --max-cron-threads 2 --workers 2 --xmlrpc-interface 127.0.0.1 --proxy-mode
|
|
|
|
|
|
|
|
|
|
.PHONY: config_update_dev
|
|
|
|
|
config_update_dev:
|
|
|
|
|
./run.sh -c config.conf -s --stop-after-init --max-cron-threads 4 --workers 4
|
|
|
|
|
|
|
|
|
|
.PHONY: config_update_dev_mono
|
|
|
|
|
config_update_dev_mono:
|
|
|
|
|
./run.sh -c config.conf -s --stop-after-init --workers 0
|
|
|
|
|
|
|
|
|
|
.PHONY: config_clear
|
|
|
|
|
config_clear:
|
|
|
|
|
rm -f ./config.conf
|
|
|
|
|
|
2021-01-14 16:26:36 -05:00
|
|
|
# generate config all repo
|
|
|
|
|
.PHONY: config_gen_all
|
|
|
|
|
config_gen_all:
|
2024-08-25 15:54:24 -04:00
|
|
|
echo "config_gen_all"
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/git/git_repo_update_group.py
|
2021-07-21 16:20:25 -04:00
|
|
|
./script/generate_config.sh
|
2021-01-14 16:26:36 -05:00
|
|
|
|
2021-07-20 19:43:28 -04:00
|
|
|
# generate config repo image_db
|
|
|
|
|
.PHONY: config_gen_image_db
|
|
|
|
|
config_gen_image_db:
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/git/git_repo_update_group.py --group base,image_db
|
2021-07-21 16:20:25 -04:00
|
|
|
./script/generate_config.sh
|
2021-07-20 19:43:28 -04:00
|
|
|
|
2025-05-04 23:10:34 -04:00
|
|
|
.PHONY: config_gen_migration
|
|
|
|
|
config_gen_migration:
|
|
|
|
|
./script/git/git_repo_update_group.py --group base,addons,migration
|
|
|
|
|
./script/generate_config.sh
|
|
|
|
|
|
2021-02-02 05:24:39 -05:00
|
|
|
##########
|
|
|
|
|
# I18n #
|
|
|
|
|
##########
|
|
|
|
|
|
|
|
|
|
# i18n generation demo_portal
|
|
|
|
|
.PHONY: i18n_generate_demo_portal
|
|
|
|
|
i18n_generate_demo_portal:
|
2025-05-04 23:10:34 -04:00
|
|
|
./odoo_bin.sh i18n --database code_generator --module demo_portal --addons_path addons/TechnoLibre_odoo-code-generator
|
2021-02-02 05:24:39 -05:00
|
|
|
|
2022-01-24 14:00:47 -05:00
|
|
|
###########
|
|
|
|
|
# Clean #
|
|
|
|
|
###########
|
|
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|
clean:
|
2025-10-31 01:10:54 -04:00
|
|
|
find . \( -name '__pycache__' -type d -prune -o -name '*.pyc' -o -name '*.pyo' \) -exec rm -rf {} +
|
2022-01-24 14:00:47 -05:00
|
|
|
|
2023-02-19 04:23:17 -05:00
|
|
|
###############
|
|
|
|
|
# Statistic #
|
|
|
|
|
###############
|
|
|
|
|
.PHONY: stat_module_evolution_per_year
|
|
|
|
|
stat_module_evolution_per_year:
|
|
|
|
|
./script/statistic/show_evolution_module.py --before_date "2016-01-01" --more_year 7
|
|
|
|
|
|
|
|
|
|
.PHONY: stat_module_evolution_per_year_OCA
|
|
|
|
|
stat_module_evolution_per_year_OCA:
|
|
|
|
|
./script/statistic/show_evolution_module.py --filter "/OCA/" --before_date "2016-01-01" --more_year 7
|
|
|
|
|
|
2024-09-11 00:28:46 -04:00
|
|
|
# Cache
|
|
|
|
|
.PHONY: clear_cache
|
|
|
|
|
clear_cache:
|
|
|
|
|
rm -rf cache artifacts .coverage coverage.json
|
2024-09-27 01:44:52 -04:00
|
|
|
|
|
|
|
|
#######
|
|
|
|
|
# IDE #
|
|
|
|
|
#######
|
|
|
|
|
.PHONY: pycharm_open
|
|
|
|
|
pycharm_open:
|
|
|
|
|
~/.local/share/JetBrains/Toolbox/scripts/pycharm .
|
|
|
|
|
|
|
|
|
|
.PHONY: pycharm_configure
|
|
|
|
|
pycharm_configure:
|
[FIX] script todo: configurer le projet PyCharm avec le venv, et réessayer
Deux défauts empêchaient le .idea d'exister. La configuration d'abord :
« make pycharm_configure » lance le script avec le python SYSTÈME, qui n'a pas
xmltodict — « ModuleNotFoundError », mesuré. update_env_version.pycharm_update()
l'appelle depuis .venv.erplibre ; la cible make et l'étape font désormais pareil.
L'ouverture ensuite : la première tentative sur un dépôt neuf peut n'écrire
aucun .idea, son configurateur d'interpréteur plantant sur « homeDir is null »,
là où la suivante l'écrit en 25 s — constaté sur deux VM. L'étape retente donc
une fois, en gardant les deux journaux. Vérifié sur erplibre-ubuntu-2604-gnome,
caches effacés : erplibre.iml, misc.xml, modules.xml, vcs.xml, et 0 processus
survivant.
--- EN ---
Two defects kept .idea from existing. The configuration first: "make
pycharm_configure" runs the script with the SYSTEM python, which lacks
xmltodict — "ModuleNotFoundError", measured. update_env_version.pycharm_update()
calls it from .venv.erplibre; the make target and the step now do the same.
The open next: the first attempt on a fresh repo can write no .idea at all, its
interpreter configurator dying on "homeDir is null", where the next one writes
it in 25 s — seen on two VMs. The step therefore retries once, keeping both
logs. Verified on erplibre-ubuntu-2604-gnome with caches wiped: erplibre.iml,
misc.xml, modules.xml, vcs.xml, and 0 surviving processes.
Assisted-by: Claude Opus 5
2026-08-19 08:11:12 -04:00
|
|
|
# Le venv du dépôt, et non le python système : le script importe xmltodict, qui
|
|
|
|
|
# vit dans .venv.erplibre. Appelé directement, il s'arrête sur
|
|
|
|
|
# « ModuleNotFoundError: No module named 'xmltodict' » — et c'est cette cible
|
|
|
|
|
# que le message d'échec de l'installation recommande. update_env_version.
|
|
|
|
|
# pycharm_update() l'appelle déjà ainsi : une seule autorité.
|
|
|
|
|
./.venv.erplibre/bin/python ./script/ide/pycharm_configuration.py --init
|