Fix build Nuitka : retirer --nofollow-import-to qui excluait les modules
Les flags --nofollow-import-to excluent complètement les modules du bundle au lieu de juste sauter leur compilation C. pdfplumber, fitz, PIL etc. étaient absents de l'exe. Augmente aussi le timeout à 120min. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
14
.github/workflows/build-windows.yml
vendored
14
.github/workflows/build-windows.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
jobs:
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 60
|
||||
timeout-minutes: 120
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -50,18 +50,6 @@ jobs:
|
||||
--include-module=eds_pseudo_manager `
|
||||
--include-data-dir=config=config `
|
||||
--include-data-dir=models=models `
|
||||
--nofollow-import-to=onnxruntime `
|
||||
--nofollow-import-to=numpy `
|
||||
--nofollow-import-to=transformers `
|
||||
--nofollow-import-to=optimum `
|
||||
--nofollow-import-to=tokenizers `
|
||||
--nofollow-import-to=sentencepiece `
|
||||
--nofollow-import-to=torch `
|
||||
--nofollow-import-to=PIL `
|
||||
--nofollow-import-to=pdfplumber `
|
||||
--nofollow-import-to=pdfminer `
|
||||
--nofollow-import-to=fitz `
|
||||
--nofollow-import-to=yaml `
|
||||
--windows-console-mode=disable `
|
||||
--output-dir=build `
|
||||
--company-name="Hopital" `
|
||||
|
||||
@@ -24,10 +24,9 @@ pip install nuitka zstandard 2>nul
|
||||
echo [build] Telechargement du modele NER si absent...
|
||||
python -c "from ner_manager_onnx import NerModelManager; m=NerModelManager(cache_dir='models'); m.load('%MODEL_ID%'); print('Modele OK'); m.unload()"
|
||||
|
||||
echo [build] Compilation avec Nuitka (cela peut prendre 10-20 min)...
|
||||
echo [build] Compilation avec Nuitka (cela peut prendre 20-40 min)...
|
||||
python -m nuitka ^
|
||||
--standalone ^
|
||||
--onefile ^
|
||||
--enable-plugin=tk-inter ^
|
||||
--include-module=anonymizer_core_refactored_onnx ^
|
||||
--include-module=ner_manager_onnx ^
|
||||
@@ -35,13 +34,12 @@ python -m nuitka ^
|
||||
--include-data-dir=config=config ^
|
||||
--include-data-dir=models=models ^
|
||||
--windows-console-mode=disable ^
|
||||
--output-filename=%APP_NAME%.exe ^
|
||||
--output-dir=build ^
|
||||
--company-name="Hopital" ^
|
||||
--product-name="Pseudonymisation de PDF" ^
|
||||
--product-version=5.0.0 ^
|
||||
--file-description="Pseudonymisation automatique de documents PDF" ^
|
||||
--assume-yes-for-downloads ^
|
||||
--remove-output ^
|
||||
%ENTRY%
|
||||
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
@@ -49,6 +47,6 @@ if %ERRORLEVEL% NEQ 0 (
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo [build] OK — Executable cree : %APP_NAME%.exe
|
||||
echo [build] OK — Dossier cree : build\%ENTRY:.py=.dist%\
|
||||
echo [build] Le modele NER est embarque. Aucun telechargement necessaire.
|
||||
endlocal
|
||||
|
||||
Reference in New Issue
Block a user