92 lines
2.3 KiB
Python
92 lines
2.3 KiB
Python
# -*- mode: python ; coding: utf-8 -*-
|
|
import os
|
|
import sys
|
|
|
|
block_cipher = None
|
|
app_dir = 'C:\\Users\\dom\\ai\\anonymisation'
|
|
|
|
# Fichiers de données à inclure
|
|
datas = [
|
|
(os.path.join(app_dir, 'config'), 'config'),
|
|
(os.path.join(app_dir, 'data', 'bdpm'), os.path.join('data', 'bdpm')),
|
|
(os.path.join(app_dir, 'data', 'finess'), os.path.join('data', 'finess')),
|
|
(os.path.join(app_dir, 'data', 'insee'), os.path.join('data', 'insee')),
|
|
(os.path.join(app_dir, 'models', 'camembert-bio-deid', 'onnx'), os.path.join('models', 'camembert-bio-deid', 'onnx')),
|
|
(os.path.join(app_dir, 'detectors'), 'detectors'),
|
|
(os.path.join(app_dir, 'scripts'), 'scripts'),
|
|
]
|
|
|
|
# Modules Python à inclure comme data (importés dynamiquement)
|
|
for pyfile in ['anonymizer_core_refactored_onnx.py', 'eds_pseudo_manager.py',
|
|
'gliner_manager.py', 'camembert_ner_manager.py',
|
|
'Pseudonymisation_Gui_V5.py']:
|
|
datas.append((os.path.join(app_dir, pyfile), '.'))
|
|
|
|
a = Analysis(
|
|
[os.path.join(app_dir, 'launcher.py')],
|
|
pathex=[app_dir],
|
|
binaries=[],
|
|
datas=datas,
|
|
hiddenimports=[
|
|
'anonymizer_core_refactored_onnx',
|
|
'eds_pseudo_manager',
|
|
'gliner_manager',
|
|
'camembert_ner_manager',
|
|
'Pseudonymisation_Gui_V5',
|
|
'edsnlp',
|
|
'edsnlp.pipes',
|
|
'edsnlp.pipes.ner',
|
|
'edsnlp.pipes.ner.pseudo',
|
|
'spacy',
|
|
'spacy.lang.fr',
|
|
'gliner',
|
|
'onnxruntime',
|
|
'transformers',
|
|
'tokenizers',
|
|
'torch',
|
|
'pdfplumber',
|
|
'ahocorasick',
|
|
'sklearn',
|
|
'scipy',
|
|
'pydantic',
|
|
'yaml',
|
|
'PIL',
|
|
'loguru',
|
|
'regex',
|
|
],
|
|
hookspath=[],
|
|
hooksconfig={},
|
|
runtime_hooks=[],
|
|
excludes=[],
|
|
win_no_prefer_redirects=False,
|
|
win_private_assemblies=False,
|
|
cipher=block_cipher,
|
|
noarchive=False,
|
|
)
|
|
|
|
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
|
|
|
exe = EXE(
|
|
pyz,
|
|
a.scripts,
|
|
[],
|
|
exclude_binaries=True,
|
|
name='Anonymisation',
|
|
debug=False,
|
|
bootloader_ignore_signals=False,
|
|
strip=False,
|
|
upx=False,
|
|
console=False, # Pas de console Windows
|
|
icon=None,
|
|
)
|
|
|
|
coll = COLLECT(
|
|
exe,
|
|
a.binaries,
|
|
a.zipfiles,
|
|
a.datas,
|
|
strip=False,
|
|
upx=False,
|
|
name='Anonymisation',
|
|
)
|