Skip to content

Commit e5f12dc

Browse files
committed
ajout du mapping pour tout esngine et mis a jour de la doc des engine traduis en anglais
1 parent e8597d8 commit e5f12dc

5 files changed

Lines changed: 660 additions & 2 deletions

File tree

ENGINES/cx_freeze/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import sys
2828
from typing import Optional
2929

30-
from engine_sdk import CompilerEngine, engine_register
30+
from engine_sdk import CompilerEngine, compute_auto_for_engine, engine_register
3131

3232

3333
@engine_register
@@ -96,6 +96,14 @@ def build_command(self, gui, file: str) -> list[str]:
9696
if hasattr(self, "_selected_icon") and self._selected_icon:
9797
cmd.extend(["--icon", self._selected_icon])
9898

99+
# Auto-mapping args (mapping.json / auto builder)
100+
try:
101+
auto_args = compute_auto_for_engine(gui, self.id)
102+
if auto_args:
103+
cmd.extend(auto_args)
104+
except Exception:
105+
pass
106+
99107
# Add the target file
100108
cmd.append(file)
101109

ENGINES/cx_freeze/mapping.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"__meta__": {
3+
"title": "CX_Freeze auto-mapping",
4+
"version": "1.0.0",
5+
"description": "Auto args for CX_Freeze based on detected packages."
6+
},
7+
"__aliases__": {
8+
"import_to_package": {
9+
"cv2": "opencv-python",
10+
"pil": "Pillow",
11+
"sklearn": "scikit-learn",
12+
"skimage": "scikit-image",
13+
"yaml": "PyYAML",
14+
"bs4": "beautifulsoup4"
15+
},
16+
"package_to_import_name": {
17+
"opencv-python": "cv2",
18+
"Pillow": "PIL",
19+
"scikit-learn": "sklearn",
20+
"scikit-image": "skimage",
21+
"PyYAML": "yaml",
22+
"beautifulsoup4": "bs4"
23+
}
24+
},
25+
"numpy": {
26+
"cx_freeze": ["--include-modules={import_name}"]
27+
},
28+
"matplotlib": {
29+
"cx_freeze": ["--include-modules={import_name}"]
30+
},
31+
"Pillow": {
32+
"cx_freeze": ["--include-modules={import_name}"]
33+
},
34+
"opencv-python": {
35+
"cx_freeze": ["--include-modules={import_name}"]
36+
},
37+
"pandas": {
38+
"cx_freeze": ["--include-modules={import_name}"]
39+
},
40+
"scipy": {
41+
"cx_freeze": ["--include-modules={import_name}"]
42+
},
43+
"scikit-learn": {
44+
"cx_freeze": ["--include-modules={import_name}"]
45+
},
46+
"scikit-image": {
47+
"cx_freeze": ["--include-modules={import_name}"]
48+
},
49+
"lxml": {
50+
"cx_freeze": ["--include-modules={import_name}"]
51+
},
52+
"PyYAML": {
53+
"cx_freeze": ["--include-modules={import_name}"]
54+
},
55+
"PySide6": {
56+
"cx_freeze": ["--include-modules={import_name}"]
57+
},
58+
"PySide2": {
59+
"cx_freeze": ["--include-modules={import_name}"]
60+
},
61+
"PyQt5": {
62+
"cx_freeze": ["--include-modules={import_name}"]
63+
},
64+
"PyQt6": {
65+
"cx_freeze": ["--include-modules={import_name}"]
66+
}
67+
}

ENGINES/pyinstaller/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from PySide6.QtCore import QDir
3232
from PySide6.QtWidgets import QFileDialog, QInputDialog
3333

34-
from engine_sdk import CompilerEngine, engine_register
34+
from engine_sdk import CompilerEngine, compute_auto_for_engine, engine_register
3535

3636

3737
@engine_register
@@ -122,6 +122,14 @@ def build_command(self, gui, file: str) -> list[str]:
122122
if name_input and name_input.text().strip():
123123
cmd.extend(["--name", name_input.text().strip()])
124124

125+
# Auto-mapping args (mapping.json / auto builder)
126+
try:
127+
auto_args = compute_auto_for_engine(gui, self.id)
128+
if auto_args:
129+
cmd.extend(auto_args)
130+
except Exception:
131+
pass
132+
125133
# Add the target file
126134
cmd.append(file)
127135

ENGINES/pyinstaller/mapping.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"__meta__": {
3+
"title": "PyInstaller auto-mapping",
4+
"version": "1.0.0",
5+
"description": "Auto args for PyInstaller based on detected packages."
6+
},
7+
"__aliases__": {
8+
"import_to_package": {
9+
"cv2": "opencv-python",
10+
"pil": "Pillow",
11+
"sklearn": "scikit-learn",
12+
"skimage": "scikit-image",
13+
"yaml": "PyYAML",
14+
"bs4": "beautifulsoup4"
15+
},
16+
"package_to_import_name": {
17+
"opencv-python": "cv2",
18+
"Pillow": "PIL",
19+
"scikit-learn": "sklearn",
20+
"scikit-image": "skimage",
21+
"PyYAML": "yaml",
22+
"beautifulsoup4": "bs4"
23+
}
24+
},
25+
"numpy": {
26+
"pyinstaller": ["--collect-all", "{import_name}"]
27+
},
28+
"matplotlib": {
29+
"pyinstaller": ["--collect-all", "{import_name}"]
30+
},
31+
"Pillow": {
32+
"pyinstaller": ["--collect-all", "{import_name}"]
33+
},
34+
"opencv-python": {
35+
"pyinstaller": ["--collect-all", "{import_name}"]
36+
},
37+
"pandas": {
38+
"pyinstaller": ["--collect-all", "{import_name}"]
39+
},
40+
"scipy": {
41+
"pyinstaller": ["--collect-all", "{import_name}"]
42+
},
43+
"scikit-learn": {
44+
"pyinstaller": ["--collect-all", "{import_name}"]
45+
},
46+
"scikit-image": {
47+
"pyinstaller": ["--collect-all", "{import_name}"]
48+
},
49+
"lxml": {
50+
"pyinstaller": ["--collect-all", "{import_name}"]
51+
},
52+
"PyYAML": {
53+
"pyinstaller": ["--hidden-import", "{import_name}"]
54+
},
55+
"PySide6": {
56+
"pyinstaller": ["--collect-all", "{import_name}"]
57+
},
58+
"PySide2": {
59+
"pyinstaller": ["--collect-all", "{import_name}"]
60+
},
61+
"PyQt5": {
62+
"pyinstaller": ["--collect-all", "{import_name}"]
63+
},
64+
"PyQt6": {
65+
"pyinstaller": ["--collect-all", "{import_name}"]
66+
}
67+
}

0 commit comments

Comments
 (0)