erplibre/.claude/rules
Mathieu Benoit e20d8d9baa [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-16 23:33:49 -04:00
..
01-versions.md [REF] claude: trim the always-loaded guidance, and fix what it got wrong 2026-08-07 01:15:33 -04:00
04-code-conventions.md [UPD] claude: align the commit command with the AI policy 2026-08-07 01:56:11 -04:00
06-code-generator.md [REF] claude: split CLAUDE.md into .claude/rules/ 2026-03-14 23:15:54 -04:00
07-documentation.md [REF] claude: trim the always-loaded guidance, and fix what it got wrong 2026-08-07 01:15:33 -04:00
08-deployment.md [ADD] install: uv to place Python packages, pip as fallback 2026-08-16 23:33:49 -04:00
09-workflow.md [REF] claude: split CLAUDE.md into .claude/rules/ 2026-03-14 23:15:54 -04:00