From 99fa464dca9146d16b8fa3f4b45703b456f9659f Mon Sep 17 00:00:00 2001 From: bruno Date: Sun, 26 Jul 2026 11:23:55 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20build-windows.bat=20=E2=80=94=20forcer?= =?UTF-8?q?=20r=C3=A9install=20pip=20deps=20+=20retirer=20plugins.shell.sc?= =?UTF-8?q?ope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - build-windows.bat: supprimer python-embed/ à chaque build (plus de skip si python.exe existe) Sans ça, uvicorn manquait car installé une seule fois puis jamais recopié - tauri.conf.json: retirer plugins.shell.scope — déprécié en Tauri v2, géré par capabilities --- desktop/build-windows.bat | 20 +++++++++----------- desktop/tauri.conf.json | 9 +-------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/desktop/build-windows.bat b/desktop/build-windows.bat index ed34ecb..301f304 100644 --- a/desktop/build-windows.bat +++ b/desktop/build-windows.bat @@ -18,19 +18,17 @@ echo ✅ Rust + Tauri OK REM ── 2. Préparer Python 3.11 embed ───────────────────────────── echo [2/5] Preparing Python embed... -if not exist "python-embed\python.exe" ( - echo 📥 Downloading Python 3.11 embed... - if exist "python-embed" rmdir /s /q "python-embed" - curl -L -o python-embed.zip "https://www.python.org/ftp/python/3.11.9/python-3.11.9-embed-amd64.zip" - powershell Expand-Archive -Path python-embed.zip -DestinationPath python-embed\ - del python-embed.zip +echo 📥 Downloading Python 3.11 embed... +if exist "python-embed" rmdir /s /q "python-embed" +curl -L -o python-embed.zip "https://www.python.org/ftp/python/3.11.9/python-3.11.9-embed-amd64.zip" +powershell Expand-Archive -Path python-embed.zip -DestinationPath python-embed\ +del python-embed.zip - REM Enable pip in embedded Python - echo import site >> python-embed\python311._pth +REM Enable pip in embedded Python +echo import site >> python-embed\python311._pth - REM Install dependencies - python-embed\python.exe -m pip install --no-cache-dir -r ..\backend\requirements.txt -) +REM Install dependencies +python-embed\python.exe -m pip install --no-cache-dir -r ..\backend\requirements.txt echo ✅ Python embed ready REM ── 3. Build Tauri ──────────────────────────────────────────── diff --git a/desktop/tauri.conf.json b/desktop/tauri.conf.json index 7423e4b..4de645f 100644 --- a/desktop/tauri.conf.json +++ b/desktop/tauri.conf.json @@ -76,14 +76,7 @@ }, "plugins": { "shell": { - "open": true, - "scope": [ - { - "name": "python-backend", - "cmd": "./python-embed/python", - "args": ["-m", "uvicorn", "backend.main:app", "--host", "127.0.0.1", "--port", "17890"] - } - ] + "open": true } } }