quantumgui 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- quantumgui-1.0.0/LICENSE +32 -0
- quantumgui-1.0.0/PKG-INFO +137 -0
- quantumgui-1.0.0/README.md +75 -0
- quantumgui-1.0.0/pyproject.toml +52 -0
- quantumgui-1.0.0/quantumgui/__init__.py +9 -0
- quantumgui-1.0.0/quantumgui/__main__.py +6 -0
- quantumgui-1.0.0/quantumgui/cli.py +341 -0
- quantumgui-1.0.0/quantumgui/core/__init__.py +39 -0
- quantumgui-1.0.0/quantumgui/core/animation.py +221 -0
- quantumgui-1.0.0/quantumgui/core/audit.py +323 -0
- quantumgui-1.0.0/quantumgui/core/context.py +54 -0
- quantumgui-1.0.0/quantumgui/core/data_source.py +426 -0
- quantumgui-1.0.0/quantumgui/core/draw.py +428 -0
- quantumgui-1.0.0/quantumgui/core/enterprise.py +402 -0
- quantumgui-1.0.0/quantumgui/core/enterprise_app.py +419 -0
- quantumgui-1.0.0/quantumgui/core/events.py +34 -0
- quantumgui-1.0.0/quantumgui/core/geometry.py +108 -0
- quantumgui-1.0.0/quantumgui/core/native_dialogs.py +276 -0
- quantumgui-1.0.0/quantumgui/core/pdf_report.py +390 -0
- quantumgui-1.0.0/quantumgui/core/rules.py +284 -0
- quantumgui-1.0.0/quantumgui/core/state.py +42 -0
- quantumgui-1.0.0/quantumgui/core/task_runner.py +181 -0
- quantumgui-1.0.0/quantumgui/core/widget.py +498 -0
- quantumgui-1.0.0/quantumgui/core/window.py +920 -0
- quantumgui-1.0.0/quantumgui/core/xlsx_export.py +145 -0
- quantumgui-1.0.0/quantumgui/py.typed +0 -0
- quantumgui-1.0.0/quantumgui/theme/__init__.py +32 -0
- quantumgui-1.0.0/quantumgui/theme/hct.py +191 -0
- quantumgui-1.0.0/quantumgui/theme/theme.py +93 -0
- quantumgui-1.0.0/quantumgui/theme/tokens.py +423 -0
- quantumgui-1.0.0/quantumgui/ui.py +2142 -0
- quantumgui-1.0.0/quantumgui/widgets/__init__.py +168 -0
- quantumgui-1.0.0/quantumgui/widgets/advanced.py +499 -0
- quantumgui-1.0.0/quantumgui/widgets/button.py +224 -0
- quantumgui-1.0.0/quantumgui/widgets/charts.py +625 -0
- quantumgui-1.0.0/quantumgui/widgets/charts_bi.py +528 -0
- quantumgui-1.0.0/quantumgui/widgets/charts_extra.py +430 -0
- quantumgui-1.0.0/quantumgui/widgets/charts_pro.py +568 -0
- quantumgui-1.0.0/quantumgui/widgets/checkbox.py +199 -0
- quantumgui-1.0.0/quantumgui/widgets/chip.py +219 -0
- quantumgui-1.0.0/quantumgui/widgets/containers.py +321 -0
- quantumgui-1.0.0/quantumgui/widgets/data_controls.py +487 -0
- quantumgui-1.0.0/quantumgui/widgets/data_grid.py +956 -0
- quantumgui-1.0.0/quantumgui/widgets/data_table.py +551 -0
- quantumgui-1.0.0/quantumgui/widgets/date_picker.py +407 -0
- quantumgui-1.0.0/quantumgui/widgets/display_media.py +372 -0
- quantumgui-1.0.0/quantumgui/widgets/display_pro.py +407 -0
- quantumgui-1.0.0/quantumgui/widgets/drawer.py +252 -0
- quantumgui-1.0.0/quantumgui/widgets/enterprise_controls.py +934 -0
- quantumgui-1.0.0/quantumgui/widgets/fab.py +261 -0
- quantumgui-1.0.0/quantumgui/widgets/forms_pro.py +703 -0
- quantumgui-1.0.0/quantumgui/widgets/forms_pro_media.py +587 -0
- quantumgui-1.0.0/quantumgui/widgets/inputs.py +870 -0
- quantumgui-1.0.0/quantumgui/widgets/layout_pro.py +162 -0
- quantumgui-1.0.0/quantumgui/widgets/list_view.py +307 -0
- quantumgui-1.0.0/quantumgui/widgets/masked_input.py +131 -0
- quantumgui-1.0.0/quantumgui/widgets/master_detail.py +155 -0
- quantumgui-1.0.0/quantumgui/widgets/navigation.py +382 -0
- quantumgui-1.0.0/quantumgui/widgets/overlays.py +355 -0
- quantumgui-1.0.0/quantumgui/widgets/productivity.py +500 -0
- quantumgui-1.0.0/quantumgui/widgets/productivity_boards.py +544 -0
- quantumgui-1.0.0/quantumgui/widgets/radio.py +209 -0
- quantumgui-1.0.0/quantumgui/widgets/scroll_view.py +129 -0
- quantumgui-1.0.0/quantumgui/widgets/select.py +373 -0
- quantumgui-1.0.0/quantumgui/widgets/sheets.py +249 -0
- quantumgui-1.0.0/quantumgui/widgets/slider.py +209 -0
- quantumgui-1.0.0/quantumgui/widgets/switch.py +196 -0
- quantumgui-1.0.0/quantumgui/widgets/tabs.py +175 -0
- quantumgui-1.0.0/quantumgui/widgets/text.py +101 -0
- quantumgui-1.0.0/quantumgui/widgets/text_field.py +490 -0
- quantumgui-1.0.0/quantumgui/widgets/time_picker.py +499 -0
- quantumgui-1.0.0/quantumgui.egg-info/PKG-INFO +137 -0
- quantumgui-1.0.0/quantumgui.egg-info/SOURCES.txt +94 -0
- quantumgui-1.0.0/quantumgui.egg-info/dependency_links.txt +1 -0
- quantumgui-1.0.0/quantumgui.egg-info/entry_points.txt +2 -0
- quantumgui-1.0.0/quantumgui.egg-info/requires.txt +9 -0
- quantumgui-1.0.0/quantumgui.egg-info/top_level.txt +1 -0
- quantumgui-1.0.0/setup.cfg +4 -0
- quantumgui-1.0.0/tests/test_cli_phase13.py +67 -0
- quantumgui-1.0.0/tests/test_controls_audit.py +228 -0
- quantumgui-1.0.0/tests/test_core.py +721 -0
- quantumgui-1.0.0/tests/test_data_source.py +144 -0
- quantumgui-1.0.0/tests/test_enterprise.py +348 -0
- quantumgui-1.0.0/tests/test_enterprise_audit.py +88 -0
- quantumgui-1.0.0/tests/test_enterprise_controls.py +213 -0
- quantumgui-1.0.0/tests/test_enterprise_master_detail.py +80 -0
- quantumgui-1.0.0/tests/test_enterprise_pdf_report.py +54 -0
- quantumgui-1.0.0/tests/test_enterprise_rules.py +117 -0
- quantumgui-1.0.0/tests/test_enterprise_task_runner.py +66 -0
- quantumgui-1.0.0/tests/test_phase10_display.py +100 -0
- quantumgui-1.0.0/tests/test_phase11_bi_charts.py +46 -0
- quantumgui-1.0.0/tests/test_phase8_forms.py +94 -0
- quantumgui-1.0.0/tests/test_phase9_productivity.py +129 -0
- quantumgui-1.0.0/tests/test_style_engine.py +293 -0
- quantumgui-1.0.0/tests/test_visual_rendering.py +202 -0
- quantumgui-1.0.0/tests/test_window_customization.py +124 -0
quantumgui-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
QuantumGUI Community & Commercial License v1.0
|
|
2
|
+
Copyright (c) 2026 QuantumGUI Authors. All rights reserved.
|
|
3
|
+
|
|
4
|
+
1. GRANT OF COMMUNITY LICENSE (FREE TIER)
|
|
5
|
+
Permission is hereby granted, free of charge, to use, copy, modify, and distribute
|
|
6
|
+
applications built with QuantumGUI ("the Software") strictly under the following
|
|
7
|
+
conditions:
|
|
8
|
+
(a) Personal, educational, academic, or non-profit open-source use; OR
|
|
9
|
+
(b) Commercial use by an individual, freelancer, or organization whose total
|
|
10
|
+
annual gross revenue (including funding or project revenue) is strictly
|
|
11
|
+
less than USD $25,000 per year.
|
|
12
|
+
|
|
13
|
+
2. COMMERCIAL LICENSE REQUIREMENT
|
|
14
|
+
Any individual, organization, or commercial project with annual gross revenue equal
|
|
15
|
+
to or greater than USD $25,000 MUST obtain a valid QuantumGUI Commercial License
|
|
16
|
+
before using the Software in production or distributing applications built with it.
|
|
17
|
+
Companies of any size may evaluate the Software internally for up to 30 days.
|
|
18
|
+
|
|
19
|
+
3. RESTRICTIONS
|
|
20
|
+
Under the Community License, you may NOT:
|
|
21
|
+
(a) Redistribute, repackage, or sell the Software itself (in whole or in part)
|
|
22
|
+
as a competing GUI library, UI component suite, or visual RAD/IDE tool;
|
|
23
|
+
(b) Remove or obscure copyright or license notices included in the Software.
|
|
24
|
+
|
|
25
|
+
4. DISCLAIMER OF WARRANTY
|
|
26
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
27
|
+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
28
|
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
29
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING FROM THE USE
|
|
30
|
+
OF THE SOFTWARE.
|
|
31
|
+
|
|
32
|
+
For commercial licensing inquiries, contact the QuantumGUI maintainers.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: quantumgui
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Native GPU-accelerated Python GUI library built 100% on Material Design 3 standards.
|
|
5
|
+
Author: QuantumGUI Contributors
|
|
6
|
+
License: QuantumGUI Community & Commercial License v1.0
|
|
7
|
+
Copyright (c) 2026 QuantumGUI Authors. All rights reserved.
|
|
8
|
+
|
|
9
|
+
1. GRANT OF COMMUNITY LICENSE (FREE TIER)
|
|
10
|
+
Permission is hereby granted, free of charge, to use, copy, modify, and distribute
|
|
11
|
+
applications built with QuantumGUI ("the Software") strictly under the following
|
|
12
|
+
conditions:
|
|
13
|
+
(a) Personal, educational, academic, or non-profit open-source use; OR
|
|
14
|
+
(b) Commercial use by an individual, freelancer, or organization whose total
|
|
15
|
+
annual gross revenue (including funding or project revenue) is strictly
|
|
16
|
+
less than USD $25,000 per year.
|
|
17
|
+
|
|
18
|
+
2. COMMERCIAL LICENSE REQUIREMENT
|
|
19
|
+
Any individual, organization, or commercial project with annual gross revenue equal
|
|
20
|
+
to or greater than USD $25,000 MUST obtain a valid QuantumGUI Commercial License
|
|
21
|
+
before using the Software in production or distributing applications built with it.
|
|
22
|
+
Companies of any size may evaluate the Software internally for up to 30 days.
|
|
23
|
+
|
|
24
|
+
3. RESTRICTIONS
|
|
25
|
+
Under the Community License, you may NOT:
|
|
26
|
+
(a) Redistribute, repackage, or sell the Software itself (in whole or in part)
|
|
27
|
+
as a competing GUI library, UI component suite, or visual RAD/IDE tool;
|
|
28
|
+
(b) Remove or obscure copyright or license notices included in the Software.
|
|
29
|
+
|
|
30
|
+
4. DISCLAIMER OF WARRANTY
|
|
31
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
32
|
+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
33
|
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
34
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING FROM THE USE
|
|
35
|
+
OF THE SOFTWARE.
|
|
36
|
+
|
|
37
|
+
For commercial licensing inquiries, contact the QuantumGUI maintainers.
|
|
38
|
+
|
|
39
|
+
Project-URL: Homepage, https://pablometal1.github.io/quantumgui-web/
|
|
40
|
+
Project-URL: Documentation, https://pablometal1.github.io/quantumgui-web/docs.html
|
|
41
|
+
Project-URL: Tutorials, https://pablometal1.github.io/quantumgui-web/tutorials.html
|
|
42
|
+
Keywords: gui,material-design-3,skia,gpu,desktop,python,erp,datagrid
|
|
43
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
44
|
+
Classifier: Intended Audience :: Developers
|
|
45
|
+
Classifier: License :: Other/Proprietary License
|
|
46
|
+
Classifier: Operating System :: OS Independent
|
|
47
|
+
Classifier: Programming Language :: Python :: 3
|
|
48
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
49
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
50
|
+
Classifier: Topic :: Software Development :: User Interfaces
|
|
51
|
+
Requires-Python: >=3.11
|
|
52
|
+
Description-Content-Type: text/markdown
|
|
53
|
+
License-File: LICENSE
|
|
54
|
+
Requires-Dist: skia-python>=130.0
|
|
55
|
+
Requires-Dist: glfw>=2.7.0
|
|
56
|
+
Requires-Dist: PyOpenGL>=3.1.7
|
|
57
|
+
Provides-Extra: dev
|
|
58
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
59
|
+
Provides-Extra: build
|
|
60
|
+
Requires-Dist: pyinstaller>=6.0; extra == "build"
|
|
61
|
+
Dynamic: license-file
|
|
62
|
+
|
|
63
|
+
# QuantumGUI
|
|
64
|
+
|
|
65
|
+
**Librería GUI nativa para Python acelerada por GPU (Skia + GLFW), diseñada 100% bajo los estándares de Material Design 3.**
|
|
66
|
+
|
|
67
|
+
Sin navegador embebido, sin WebView y sin dependencias de otros toolkits GUI (`tkinter`, Qt o wx). Interfaz fluida a 120 FPS con API declarativa en bloques `with`, modificadores encadenables y Suite Empresarial completa.
|
|
68
|
+
|
|
69
|
+
- **Web oficial:** https://pablometal1.github.io/quantumgui-web/
|
|
70
|
+
- **Documentación API (112 secciones):** https://pablometal1.github.io/quantumgui-web/docs.html
|
|
71
|
+
- **Tutoriales (36 capítulos):** https://pablometal1.github.io/quantumgui-web/tutorials.html
|
|
72
|
+
- **Roadmap (13/13 — v1.0.0):** https://pablometal1.github.io/quantumgui-web/roadmap.html
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Instalación
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pip install quantumgui
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Requiere **Python 3.11+**. Instala automáticamente `skia-python`, `glfw` y `PyOpenGL`.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Inicio Rápido
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from quantumgui import Theme, ui
|
|
90
|
+
|
|
91
|
+
theme = Theme(seed="#6750A4", mode="light")
|
|
92
|
+
contador = ui.state(0)
|
|
93
|
+
|
|
94
|
+
win = ui.window("Mi Primera App", width=760, height=440, theme=theme, main=True)
|
|
95
|
+
with win:
|
|
96
|
+
with ui.column(gap=16, align="stretch").padding(24):
|
|
97
|
+
with ui.row(justify="space_between", align="center").fill_width():
|
|
98
|
+
ui.text("QuantumGUI v1.0", role="headline_medium")
|
|
99
|
+
ui.switch(
|
|
100
|
+
label="Modo Oscuro",
|
|
101
|
+
on_change=lambda d: setattr(theme, "mode", "dark" if d else "light"),
|
|
102
|
+
)
|
|
103
|
+
with ui.card(variant="elevated", gap=12):
|
|
104
|
+
ui.text(lambda: f"Clicks: {contador.value}", role="title_large")
|
|
105
|
+
ui.button("Sumar +1", icon="add", on_click=lambda: setattr(contador, "value", contador.value + 1))
|
|
106
|
+
|
|
107
|
+
win.run()
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Características Principales (v1.0.0)
|
|
113
|
+
|
|
114
|
+
- **Renderizado 100% GPU nativo (Retained Mode):** Skia + GLFW + OpenGL con invalidación por demanda (0% consumo en reposo), soporte HiDPI/4K, física *M3 Expressive Spring* y *Ripple*.
|
|
115
|
+
- **Motor de Color Dinámico HCT (Material Design 3):** genera automáticamente todas las paletas tonales Light/Dark y niveles de contraste desde un único color `seed`.
|
|
116
|
+
- **Motor Universal de Estilos:** `.bg()`, `.fg()`, `.border()`, `.radius()`, `.elevation()`, `.opacity()`, `.size()`, `.padding()`, `.margin()`, `.tooltip()` en todos los controles.
|
|
117
|
+
- **95+ Controles M3 y 18 Gráficos GPU:** botones, formularios avanzados (`Autocomplete`, `TagInput`, `OTPInput`, `SignaturePad`, `DropZone`, `CurrencyInput`), productividad (`KanbanBoard`, `CalendarView`, `CommandPalette`, `PropertyGrid`), y gráficos BI (`Line`, `Bar`, `Donut`, `Candlestick`, `Treemap`, `Sankey`, `Waterfall`, `BoxPlot`, `Heatmap`, `Gantt`, `Sparkline`).
|
|
118
|
+
- **Suite Empresarial:**
|
|
119
|
+
- `ui.data_grid` virtualizado en $O(1)$ para **+100.000 filas a 120 FPS** (`page_size=100`, `virtualized=True`, edición inline, totales, CSV y Excel `.xlsx` nativo).
|
|
120
|
+
- `ui.sql_source` y `ui.csv_source` (conexión directa a SQLite, PostgreSQL, MySQL, SQL Server y SQLAlchemy con guardado `UPDATE` automático).
|
|
121
|
+
- `ui.rule_engine` (reglas de negocio reactivas y campos calculados), `ui.audit_log` + `ui.history` (Undo/Redo), `ui.master_detail`, `ui.pdf_report` multipágina vectorial, `ui.task_runner`, `ui.auth` (RBAC), `ui.i18n`, `ui.router`, `ui.preferences`.
|
|
122
|
+
- Ventanas personalizables (`frameless`, `transparent`, DWM Dark Mode y `titlebar_color` en Windows 10/11, `on_file_drop`, `ui.set_main_window`).
|
|
123
|
+
- **CLI oficial `quantumgui`:**
|
|
124
|
+
```bash
|
|
125
|
+
quantumgui info
|
|
126
|
+
quantumgui new mi_erp --template erp
|
|
127
|
+
quantumgui run mi_erp/main.py --watch # Hot-Reload automático
|
|
128
|
+
quantumgui build mi_erp/main.py # Ejecutable standalone .exe
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Licencia
|
|
134
|
+
|
|
135
|
+
**QuantumGUI Community & Commercial License v1.0** (ver `LICENSE`):
|
|
136
|
+
- **Gratis** para uso personal, educativo, open-source y proyectos/empresas con ingresos brutos anuales menores a **USD \$25.000**.
|
|
137
|
+
- **Licencia Comercial** requerida para organizaciones o proyectos comerciales con ingresos brutos anuales iguales o superiores a **USD \$25.000**.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# QuantumGUI
|
|
2
|
+
|
|
3
|
+
**Librería GUI nativa para Python acelerada por GPU (Skia + GLFW), diseñada 100% bajo los estándares de Material Design 3.**
|
|
4
|
+
|
|
5
|
+
Sin navegador embebido, sin WebView y sin dependencias de otros toolkits GUI (`tkinter`, Qt o wx). Interfaz fluida a 120 FPS con API declarativa en bloques `with`, modificadores encadenables y Suite Empresarial completa.
|
|
6
|
+
|
|
7
|
+
- **Web oficial:** https://pablometal1.github.io/quantumgui-web/
|
|
8
|
+
- **Documentación API (112 secciones):** https://pablometal1.github.io/quantumgui-web/docs.html
|
|
9
|
+
- **Tutoriales (36 capítulos):** https://pablometal1.github.io/quantumgui-web/tutorials.html
|
|
10
|
+
- **Roadmap (13/13 — v1.0.0):** https://pablometal1.github.io/quantumgui-web/roadmap.html
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Instalación
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install quantumgui
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Requiere **Python 3.11+**. Instala automáticamente `skia-python`, `glfw` y `PyOpenGL`.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Inicio Rápido
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
from quantumgui import Theme, ui
|
|
28
|
+
|
|
29
|
+
theme = Theme(seed="#6750A4", mode="light")
|
|
30
|
+
contador = ui.state(0)
|
|
31
|
+
|
|
32
|
+
win = ui.window("Mi Primera App", width=760, height=440, theme=theme, main=True)
|
|
33
|
+
with win:
|
|
34
|
+
with ui.column(gap=16, align="stretch").padding(24):
|
|
35
|
+
with ui.row(justify="space_between", align="center").fill_width():
|
|
36
|
+
ui.text("QuantumGUI v1.0", role="headline_medium")
|
|
37
|
+
ui.switch(
|
|
38
|
+
label="Modo Oscuro",
|
|
39
|
+
on_change=lambda d: setattr(theme, "mode", "dark" if d else "light"),
|
|
40
|
+
)
|
|
41
|
+
with ui.card(variant="elevated", gap=12):
|
|
42
|
+
ui.text(lambda: f"Clicks: {contador.value}", role="title_large")
|
|
43
|
+
ui.button("Sumar +1", icon="add", on_click=lambda: setattr(contador, "value", contador.value + 1))
|
|
44
|
+
|
|
45
|
+
win.run()
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Características Principales (v1.0.0)
|
|
51
|
+
|
|
52
|
+
- **Renderizado 100% GPU nativo (Retained Mode):** Skia + GLFW + OpenGL con invalidación por demanda (0% consumo en reposo), soporte HiDPI/4K, física *M3 Expressive Spring* y *Ripple*.
|
|
53
|
+
- **Motor de Color Dinámico HCT (Material Design 3):** genera automáticamente todas las paletas tonales Light/Dark y niveles de contraste desde un único color `seed`.
|
|
54
|
+
- **Motor Universal de Estilos:** `.bg()`, `.fg()`, `.border()`, `.radius()`, `.elevation()`, `.opacity()`, `.size()`, `.padding()`, `.margin()`, `.tooltip()` en todos los controles.
|
|
55
|
+
- **95+ Controles M3 y 18 Gráficos GPU:** botones, formularios avanzados (`Autocomplete`, `TagInput`, `OTPInput`, `SignaturePad`, `DropZone`, `CurrencyInput`), productividad (`KanbanBoard`, `CalendarView`, `CommandPalette`, `PropertyGrid`), y gráficos BI (`Line`, `Bar`, `Donut`, `Candlestick`, `Treemap`, `Sankey`, `Waterfall`, `BoxPlot`, `Heatmap`, `Gantt`, `Sparkline`).
|
|
56
|
+
- **Suite Empresarial:**
|
|
57
|
+
- `ui.data_grid` virtualizado en $O(1)$ para **+100.000 filas a 120 FPS** (`page_size=100`, `virtualized=True`, edición inline, totales, CSV y Excel `.xlsx` nativo).
|
|
58
|
+
- `ui.sql_source` y `ui.csv_source` (conexión directa a SQLite, PostgreSQL, MySQL, SQL Server y SQLAlchemy con guardado `UPDATE` automático).
|
|
59
|
+
- `ui.rule_engine` (reglas de negocio reactivas y campos calculados), `ui.audit_log` + `ui.history` (Undo/Redo), `ui.master_detail`, `ui.pdf_report` multipágina vectorial, `ui.task_runner`, `ui.auth` (RBAC), `ui.i18n`, `ui.router`, `ui.preferences`.
|
|
60
|
+
- Ventanas personalizables (`frameless`, `transparent`, DWM Dark Mode y `titlebar_color` en Windows 10/11, `on_file_drop`, `ui.set_main_window`).
|
|
61
|
+
- **CLI oficial `quantumgui`:**
|
|
62
|
+
```bash
|
|
63
|
+
quantumgui info
|
|
64
|
+
quantumgui new mi_erp --template erp
|
|
65
|
+
quantumgui run mi_erp/main.py --watch # Hot-Reload automático
|
|
66
|
+
quantumgui build mi_erp/main.py # Ejecutable standalone .exe
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Licencia
|
|
72
|
+
|
|
73
|
+
**QuantumGUI Community & Commercial License v1.0** (ver `LICENSE`):
|
|
74
|
+
- **Gratis** para uso personal, educativo, open-source y proyectos/empresas con ingresos brutos anuales menores a **USD \$25.000**.
|
|
75
|
+
- **Licencia Comercial** requerida para organizaciones o proyectos comerciales con ingresos brutos anuales iguales o superiores a **USD \$25.000**.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "quantumgui"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Native GPU-accelerated Python GUI library built 100% on Material Design 3 standards."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = { file = "LICENSE" }
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "QuantumGUI Contributors" },
|
|
14
|
+
]
|
|
15
|
+
keywords = ["gui", "material-design-3", "skia", "gpu", "desktop", "python", "erp", "datagrid"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 5 - Production/Stable",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"License :: Other/Proprietary License",
|
|
20
|
+
"Operating System :: OS Independent",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Topic :: Software Development :: User Interfaces",
|
|
25
|
+
]
|
|
26
|
+
dependencies = [
|
|
27
|
+
"skia-python>=130.0",
|
|
28
|
+
"glfw>=2.7.0",
|
|
29
|
+
"PyOpenGL>=3.1.7",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.optional-dependencies]
|
|
33
|
+
dev = [
|
|
34
|
+
"pytest>=8.0",
|
|
35
|
+
]
|
|
36
|
+
build = [
|
|
37
|
+
"pyinstaller>=6.0",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
[project.scripts]
|
|
41
|
+
quantumgui = "quantumgui.cli:main"
|
|
42
|
+
|
|
43
|
+
[project.urls]
|
|
44
|
+
Homepage = "https://pablometal1.github.io/quantumgui-web/"
|
|
45
|
+
Documentation = "https://pablometal1.github.io/quantumgui-web/docs.html"
|
|
46
|
+
Tutorials = "https://pablometal1.github.io/quantumgui-web/tutorials.html"
|
|
47
|
+
|
|
48
|
+
[tool.setuptools.packages.find]
|
|
49
|
+
include = ["quantumgui*"]
|
|
50
|
+
|
|
51
|
+
[tool.pytest.ini_options]
|
|
52
|
+
pythonpath = ["."]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""QuantumGUI — Native GPU-accelerated Python GUI library built 100% on Material Design 3."""
|
|
2
|
+
|
|
3
|
+
from . import ui
|
|
4
|
+
from .core.state import State
|
|
5
|
+
from .theme import Color, Theme
|
|
6
|
+
|
|
7
|
+
__version__ = "1.0.0"
|
|
8
|
+
|
|
9
|
+
__all__ = ["Color", "State", "Theme", "__version__", "ui"]
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
"""Official QuantumGUI CLI (`quantumgui run --watch`, `build`, `new`, `info`).
|
|
2
|
+
|
|
3
|
+
Zero external CLI dependencies (uses Python stdlib `argparse` + `subprocess`).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import argparse
|
|
9
|
+
import platform
|
|
10
|
+
import shutil
|
|
11
|
+
import subprocess
|
|
12
|
+
import sys
|
|
13
|
+
import time
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
from typing import Sequence
|
|
16
|
+
|
|
17
|
+
__all__ = ["main", "build_package_command", "scaffold_project", "scan_py_mtimes"]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _get_version() -> str:
|
|
21
|
+
try:
|
|
22
|
+
from . import __version__
|
|
23
|
+
|
|
24
|
+
return __version__
|
|
25
|
+
except Exception:
|
|
26
|
+
return "1.0.0"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# ---------------------------------------------------------------------------
|
|
30
|
+
# 1. `quantumgui info`
|
|
31
|
+
# ---------------------------------------------------------------------------
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def collect_env_info() -> dict[str, str]:
|
|
35
|
+
info: dict[str, str] = {
|
|
36
|
+
"quantumgui": _get_version(),
|
|
37
|
+
"python": platform.python_version(),
|
|
38
|
+
"platform": f"{platform.system()} {platform.release()} ({platform.machine()})",
|
|
39
|
+
}
|
|
40
|
+
for mod_name in ("skia", "glfw", "OpenGL"):
|
|
41
|
+
try:
|
|
42
|
+
m = __import__(mod_name)
|
|
43
|
+
info[mod_name] = str(getattr(m, "__version__", "installed"))
|
|
44
|
+
except Exception:
|
|
45
|
+
info[mod_name] = "not installed"
|
|
46
|
+
for tool in ("pyinstaller", "nuitka"):
|
|
47
|
+
info[tool] = "available" if shutil.which(tool) else "not installed"
|
|
48
|
+
return info
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def cmd_info(_args: argparse.Namespace) -> int:
|
|
52
|
+
info = collect_env_info()
|
|
53
|
+
print(f"QuantumGUI v{info['quantumgui']} — Material Design 3 Native GPU Engine")
|
|
54
|
+
print("-" * 56)
|
|
55
|
+
for k, v in info.items():
|
|
56
|
+
if k != "quantumgui":
|
|
57
|
+
print(f" {k:14s}: {v}")
|
|
58
|
+
return 0
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
# ---------------------------------------------------------------------------
|
|
62
|
+
# 2. `quantumgui new <name>`
|
|
63
|
+
# ---------------------------------------------------------------------------
|
|
64
|
+
|
|
65
|
+
_TEMPLATE_BASIC = '''"""Aplicación inicial creada con `quantumgui new`."""
|
|
66
|
+
|
|
67
|
+
from quantumgui import Theme, ui
|
|
68
|
+
|
|
69
|
+
theme = Theme(seed="#6750A4", mode="light")
|
|
70
|
+
contador = ui.state(0)
|
|
71
|
+
|
|
72
|
+
win = ui.window("{title}", width=820, height=520, theme=theme, main=True)
|
|
73
|
+
with win:
|
|
74
|
+
with ui.column(gap=16, align="stretch").padding(24):
|
|
75
|
+
with ui.row(justify="space_between", align="center").fill_width():
|
|
76
|
+
ui.text("{title}", role="headline_medium")
|
|
77
|
+
ui.switch(
|
|
78
|
+
value=False,
|
|
79
|
+
label="Modo Oscuro",
|
|
80
|
+
on_change=lambda d: setattr(theme, "mode", "dark" if d else "light"),
|
|
81
|
+
)
|
|
82
|
+
with ui.card(variant="elevated", gap=12):
|
|
83
|
+
ui.text(lambda: f"Clicks acumulados: {{contador.value}}", role="title_large")
|
|
84
|
+
with ui.row(gap=10):
|
|
85
|
+
ui.button("Sumar +1", icon="add", on_click=lambda: setattr(contador, "value", contador.value + 1))
|
|
86
|
+
ui.button("Reiniciar", variant="outlined", on_click=lambda: setattr(contador, "value", 0))
|
|
87
|
+
|
|
88
|
+
win.run()
|
|
89
|
+
'''
|
|
90
|
+
|
|
91
|
+
_TEMPLATE_ERP = '''"""Plantilla ERP empresarial creada con `quantumgui new --template erp`."""
|
|
92
|
+
|
|
93
|
+
from quantumgui import Theme, ui
|
|
94
|
+
|
|
95
|
+
theme = Theme(seed="#0061A4", mode="light")
|
|
96
|
+
registros = [
|
|
97
|
+
{{"id": 1, "cliente": "Acme Corp", "estado": "Pagado", "importe": 12450.50}},
|
|
98
|
+
{{"id": 2, "cliente": "Globex S.A.", "estado": "Pendiente", "importe": 8900.00}},
|
|
99
|
+
{{"id": 3, "cliente": "Initech", "estado": "Pagado", "importe": 15200.00}},
|
|
100
|
+
]
|
|
101
|
+
|
|
102
|
+
win = ui.window("{title}", width=1040, height=680, theme=theme, main=True, min_size=(800, 520))
|
|
103
|
+
with win:
|
|
104
|
+
with ui.column(gap=14, align="stretch").padding(20):
|
|
105
|
+
with ui.row(justify="space_between", align="center").fill_width():
|
|
106
|
+
ui.text("{title} — Panel ERP", role="headline_small")
|
|
107
|
+
with ui.row(gap=8):
|
|
108
|
+
ui.button("Exportar Excel", variant="tonal", icon="save", on_click=lambda: grid.export_xlsx("reporte.xlsx"))
|
|
109
|
+
ui.switch(label="Oscuro", on_change=lambda d: setattr(theme, "mode", "dark" if d else "light"))
|
|
110
|
+
|
|
111
|
+
grid = ui.data_grid(
|
|
112
|
+
source=registros,
|
|
113
|
+
column_overrides={{
|
|
114
|
+
"importe": ui.grid_column("Importe", type="currency", aggregate="sum"),
|
|
115
|
+
"estado": ui.grid_column("Estado", type="badge", badge_colors={{"Pagado": "primary", "Pendiente": "tertiary"}}),
|
|
116
|
+
}},
|
|
117
|
+
page_size=100,
|
|
118
|
+
virtualized=True,
|
|
119
|
+
editable=True,
|
|
120
|
+
height=480,
|
|
121
|
+
).fill_width()
|
|
122
|
+
|
|
123
|
+
win.run()
|
|
124
|
+
'''
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def scaffold_project(name: str, *, target_dir: str | Path = ".", template: str = "basic") -> Path:
|
|
128
|
+
"""Create a runnable QuantumGUI starter project directory."""
|
|
129
|
+
dest = Path(target_dir) / name
|
|
130
|
+
dest.mkdir(parents=True, exist_ok=True)
|
|
131
|
+
title = name.replace("_", " ").replace("-", " ").title()
|
|
132
|
+
tpl = _TEMPLATE_ERP if template == "erp" else _TEMPLATE_BASIC
|
|
133
|
+
(dest / "main.py").write_text(tpl.format(title=title), encoding="utf-8")
|
|
134
|
+
(dest / "requirements.txt").write_text("quantumgui>=1.0.0\n", encoding="utf-8")
|
|
135
|
+
(dest / "README.md").write_text(
|
|
136
|
+
f"# {title}\n\nCreado con QuantumGUI.\n\n```bash\nquantumgui run main.py --watch\n```\n",
|
|
137
|
+
encoding="utf-8",
|
|
138
|
+
)
|
|
139
|
+
return dest
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def cmd_new(args: argparse.Namespace) -> int:
|
|
143
|
+
dest = scaffold_project(args.name, target_dir=args.dir, template=args.template)
|
|
144
|
+
print(f"Proyecto creado en: {dest.resolve()}")
|
|
145
|
+
print(f"Ejecuta: quantumgui run {dest / 'main.py'} --watch")
|
|
146
|
+
return 0
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
# ---------------------------------------------------------------------------
|
|
150
|
+
# 3. `quantumgui run <script.py> [--watch]` (Hot-Reload)
|
|
151
|
+
# ---------------------------------------------------------------------------
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def scan_py_mtimes(root: Path) -> dict[Path, float]:
|
|
155
|
+
"""Return `{path: mtime}` for all `.py` files under `root` (skipping venv/.git/__pycache__)."""
|
|
156
|
+
skip = {".venv", "venv", ".git", "__pycache__", "build", "dist"}
|
|
157
|
+
out: dict[Path, float] = {}
|
|
158
|
+
if root.is_file():
|
|
159
|
+
return {root: root.stat().st_mtime}
|
|
160
|
+
for p in root.rglob("*.py"):
|
|
161
|
+
if any(part in skip for part in p.parts):
|
|
162
|
+
continue
|
|
163
|
+
try:
|
|
164
|
+
out[p] = p.stat().st_mtime
|
|
165
|
+
except OSError:
|
|
166
|
+
pass
|
|
167
|
+
return out
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def cmd_run(args: argparse.Namespace) -> int:
|
|
171
|
+
script = Path(args.script).resolve()
|
|
172
|
+
if not script.is_file():
|
|
173
|
+
print(f"Error: archivo no encontrado: {script}", file=sys.stderr)
|
|
174
|
+
return 1
|
|
175
|
+
|
|
176
|
+
cmd = [sys.executable, str(script), *args.extra]
|
|
177
|
+
if not args.watch:
|
|
178
|
+
return subprocess.call(cmd)
|
|
179
|
+
|
|
180
|
+
watch_dir = script.parent
|
|
181
|
+
print(f"[QuantumGUI Hot-Reload] Observando {watch_dir} (Ctrl+C para salir)")
|
|
182
|
+
mtimes = scan_py_mtimes(watch_dir)
|
|
183
|
+
proc = subprocess.Popen(cmd)
|
|
184
|
+
try:
|
|
185
|
+
while True:
|
|
186
|
+
time.sleep(max(0.15, float(args.interval)))
|
|
187
|
+
new_mtimes = scan_py_mtimes(watch_dir)
|
|
188
|
+
if new_mtimes != mtimes:
|
|
189
|
+
mtimes = new_mtimes
|
|
190
|
+
print("[QuantumGUI Hot-Reload] Cambio detectado — reiniciando app...")
|
|
191
|
+
if proc.poll() is None:
|
|
192
|
+
proc.terminate()
|
|
193
|
+
try:
|
|
194
|
+
proc.wait(timeout=3.0)
|
|
195
|
+
except subprocess.TimeoutExpired:
|
|
196
|
+
proc.kill()
|
|
197
|
+
proc = subprocess.Popen(cmd)
|
|
198
|
+
elif proc.poll() is not None:
|
|
199
|
+
# App closed by user — exit cleanly
|
|
200
|
+
return proc.returncode or 0
|
|
201
|
+
except KeyboardInterrupt:
|
|
202
|
+
if proc.poll() is None:
|
|
203
|
+
proc.terminate()
|
|
204
|
+
return 0
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
# ---------------------------------------------------------------------------
|
|
208
|
+
# 4. `quantumgui build <script.py>` (Standalone .exe via PyInstaller / Nuitka)
|
|
209
|
+
# ---------------------------------------------------------------------------
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def build_package_command(
|
|
213
|
+
script: str | Path,
|
|
214
|
+
*,
|
|
215
|
+
backend: str = "auto",
|
|
216
|
+
name: str | None = None,
|
|
217
|
+
icon: str | Path | None = None,
|
|
218
|
+
console: bool = False,
|
|
219
|
+
onefile: bool = True,
|
|
220
|
+
) -> list[str]:
|
|
221
|
+
"""Construct the PyInstaller or Nuitka standalone executable command for a QuantumGUI app."""
|
|
222
|
+
src = Path(script)
|
|
223
|
+
app_name = name or src.stem
|
|
224
|
+
|
|
225
|
+
chosen = backend
|
|
226
|
+
if chosen == "auto":
|
|
227
|
+
chosen = "nuitka" if shutil.which("nuitka") else "pyinstaller"
|
|
228
|
+
|
|
229
|
+
if chosen == "nuitka":
|
|
230
|
+
cmd = [
|
|
231
|
+
sys.executable,
|
|
232
|
+
"-m",
|
|
233
|
+
"nuitka",
|
|
234
|
+
"--standalone",
|
|
235
|
+
f"--output-filename={app_name}",
|
|
236
|
+
"--include-package=quantumgui",
|
|
237
|
+
"--include-package=skia",
|
|
238
|
+
"--include-package=glfw",
|
|
239
|
+
"--include-package=OpenGL",
|
|
240
|
+
]
|
|
241
|
+
if onefile:
|
|
242
|
+
cmd.append("--onefile")
|
|
243
|
+
if not console and sys.platform == "win32":
|
|
244
|
+
cmd.append("--windows-console-mode=disable")
|
|
245
|
+
if icon:
|
|
246
|
+
cmd.append(f"--windows-icon-from-ico={icon}")
|
|
247
|
+
cmd.append(str(src))
|
|
248
|
+
return cmd
|
|
249
|
+
|
|
250
|
+
# PyInstaller (default)
|
|
251
|
+
cmd = [
|
|
252
|
+
sys.executable,
|
|
253
|
+
"-m",
|
|
254
|
+
"PyInstaller",
|
|
255
|
+
"--noconfirm",
|
|
256
|
+
"--clean",
|
|
257
|
+
f"--name={app_name}",
|
|
258
|
+
"--collect-all=skia",
|
|
259
|
+
"--collect-all=glfw",
|
|
260
|
+
"--collect-all=OpenGL",
|
|
261
|
+
"--collect-submodules=quantumgui",
|
|
262
|
+
]
|
|
263
|
+
cmd.append("--onefile" if onefile else "--onedir")
|
|
264
|
+
if not console:
|
|
265
|
+
cmd.append("--windowed")
|
|
266
|
+
if icon:
|
|
267
|
+
cmd.append(f"--icon={icon}")
|
|
268
|
+
cmd.append(str(src))
|
|
269
|
+
return cmd
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
def cmd_build(args: argparse.Namespace) -> int:
|
|
273
|
+
src = Path(args.script)
|
|
274
|
+
if not src.is_file() and not args.dry_run:
|
|
275
|
+
print(f"Error: archivo no encontrado: {src}", file=sys.stderr)
|
|
276
|
+
return 1
|
|
277
|
+
cmd = build_package_command(
|
|
278
|
+
src,
|
|
279
|
+
backend=args.backend,
|
|
280
|
+
name=args.name,
|
|
281
|
+
icon=args.icon,
|
|
282
|
+
console=args.console,
|
|
283
|
+
onefile=not args.onedir,
|
|
284
|
+
)
|
|
285
|
+
print("Comando de compilación:")
|
|
286
|
+
print(" ", " ".join(cmd))
|
|
287
|
+
if args.dry_run:
|
|
288
|
+
return 0
|
|
289
|
+
return subprocess.call(cmd)
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
# ---------------------------------------------------------------------------
|
|
293
|
+
# Entry point
|
|
294
|
+
# ---------------------------------------------------------------------------
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
298
|
+
p = argparse.ArgumentParser(
|
|
299
|
+
prog="quantumgui",
|
|
300
|
+
description="QuantumGUI CLI — Hot-Reload, compilación standalone (.exe) y plantillas M3.",
|
|
301
|
+
)
|
|
302
|
+
p.add_argument("--version", action="version", version=f"quantumgui {_get_version()}")
|
|
303
|
+
sub = p.add_subparsers(dest="command", required=True)
|
|
304
|
+
|
|
305
|
+
p_info = sub.add_parser("info", help="Muestra información del entorno Python/Skia/GLFW.")
|
|
306
|
+
p_info.set_defaults(func=cmd_info)
|
|
307
|
+
|
|
308
|
+
p_new = sub.add_parser("new", help="Crea un proyecto inicial QuantumGUI M3.")
|
|
309
|
+
p_new.add_argument("name", help="Nombre de la carpeta del proyecto.")
|
|
310
|
+
p_new.add_argument("--dir", default=".", help="Directorio padre (por defecto '.').")
|
|
311
|
+
p_new.add_argument("--template", choices=("basic", "erp"), default="basic", help="Plantilla inicial.")
|
|
312
|
+
p_new.set_defaults(func=cmd_new)
|
|
313
|
+
|
|
314
|
+
p_run = sub.add_parser("run", help="Ejecuta una app QuantumGUI (con --watch para Hot-Reload).")
|
|
315
|
+
p_run.add_argument("script", help="Ruta al archivo Python principal.")
|
|
316
|
+
p_run.add_argument("--watch", action="store_true", help="Recarga automáticamente al guardar cambios.")
|
|
317
|
+
p_run.add_argument("--interval", type=float, default=0.5, help="Intervalo de sondeo en segundos.")
|
|
318
|
+
p_run.add_argument("extra", nargs=argparse.REMAINDER, help="Argumentos extra para el script.")
|
|
319
|
+
p_run.set_defaults(func=cmd_run)
|
|
320
|
+
|
|
321
|
+
p_build = sub.add_parser("build", help="Compila una app a ejecutable standalone (.exe).")
|
|
322
|
+
p_build.add_argument("script", help="Ruta al archivo Python principal.")
|
|
323
|
+
p_build.add_argument("--backend", choices=("auto", "pyinstaller", "nuitka"), default="auto")
|
|
324
|
+
p_build.add_argument("--name", default=None, help="Nombre del ejecutable resultante.")
|
|
325
|
+
p_build.add_argument("--icon", default=None, help="Ruta a ícono .ico/.png.")
|
|
326
|
+
p_build.add_argument("--console", action="store_true", help="Mantener consola visible.")
|
|
327
|
+
p_build.add_argument("--onedir", action="store_true", help="Generar carpeta en lugar de un único archivo.")
|
|
328
|
+
p_build.add_argument("--dry-run", action="store_true", help="Muestra el comando sin ejecutarlo.")
|
|
329
|
+
p_build.set_defaults(func=cmd_build)
|
|
330
|
+
|
|
331
|
+
return p
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
def main(argv: Sequence[str] | None = None) -> int:
|
|
335
|
+
parser = build_parser()
|
|
336
|
+
args = parser.parse_args(argv)
|
|
337
|
+
return int(args.func(args))
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
if __name__ == "__main__":
|
|
341
|
+
raise SystemExit(main())
|