pywingui 4.2.0__cp312-none-win_amd64.whl

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.
pywinGUI/__init__.py ADDED
@@ -0,0 +1,4 @@
1
+ from .controller import *
2
+ from .ai_agent_error_engine import AIAgentErrorEngine
3
+
4
+ __all__ = [n for n in dir() if not n.startswith('_')]
Binary file
@@ -0,0 +1,199 @@
1
+ Metadata-Version: 2.4
2
+ Name: pywinGUI
3
+ Version: 4.2.0
4
+ Summary: PyWinGUI GUI Automation Library for Windows Forms (Binary Distribution)
5
+ Author: User
6
+ Requires-Python: <3.14,>=3.11
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: pywinauto
9
+ Requires-Dist: requests
10
+ Requires-Dist: pyautogui
11
+ Requires-Dist: pywin32
12
+ Requires-Dist: pillow
13
+ Requires-Dist: cryptography
14
+ Requires-Dist: pygetwindow
15
+ Requires-Dist: opencv-python
16
+
17
+ # build_tools — README
18
+
19
+ This document explains how to build, test, and publish Windows Nuitka-compiled wheels for the `pywinGUI` project using the repository's build scripts and GitHub Actions.
20
+
21
+ Checklist
22
+ - [ ] Create PyPI API token and add it to GitHub Secrets (`PYPI_API_TOKEN`).
23
+ - [ ] Verify `make_nuitka_wheel.ps1` and `push.ps1` are configured correctly.
24
+ - [ ] Test a local build for each target Python interpreter (32-bit and 64-bit).
25
+ - [ ] (Optional) Run the GitHub Actions workflow manually to inspect artifacts.
26
+ - [ ] Tag and push when ready to publish to PyPI (workflow will run and upload wheels).
27
+
28
+ Overview
29
+ - `make_nuitka_wheel.ps1` — Builds a wheel for a specific Python interpreter using Nuitka. It compiles selected modules into extension modules and packages them into a wheel.
30
+ - `push.ps1` — Uploads the built wheel(s) to PyPI using `twine`, reading the token from environment variables (`PYPI_API_TOKEN` or `TWINE_PASSWORD`).
31
+ - GitHub Actions workflow (`.github/workflows/build-windows-wheels.yml`) — Builds Windows wheels across a matrix of Python versions and architectures (x86/x64) and publishes them to PyPI when a tag is pushed and `PYPI_API_TOKEN` is set as a secret.
32
+
33
+ Security model
34
+ - For releasing protected/compiled code, build and publish per-ABI wheels (win32 and win_amd64) and do not include source fallback files in release wheels. To do that, run the build script without the `-IncludeSourceFallbacks` switch.
35
+ - If you need debug/compatibility builds that include Python source fallbacks, run the build script with `-IncludeSourceFallbacks`. Do not publish fallback-enabled wheels to PyPI if you want to protect source code.
36
+
37
+ Local usage
38
+
39
+ 1) Build a secure wheel (no source fallbacks)
40
+
41
+ Open PowerShell in the repository root and run:
42
+
43
+ ```powershell
44
+ # Build for a target Python interpreter (replace path with target python.exe)
45
+ .\build_tools\make_nuitka_wheel.ps1 -PythonExe "C:\Path\To\Target\python.exe"
46
+ ```
47
+
48
+ 2) Build a compatibility/debug wheel (includes `_source.py` fallbacks)
49
+
50
+ ```powershell
51
+ # Include source fallbacks for debugging (not recommended for protected releases)
52
+ .\build_tools\make_nuitka_wheel.ps1 -PythonExe "C:\Path\To\Target\python.exe" -IncludeSourceFallbacks
53
+ ```
54
+
55
+ 3) Inspect the produced wheel
56
+
57
+ After the build completes, the wheel(s) are placed under `dist\`. To list the wheel files:
58
+
59
+ ```powershell
60
+ Get-ChildItem .\dist\*.whl | Sort-Object LastWriteTime -Descending | Format-Table Name,FullName -AutoSize
61
+ ```
62
+
63
+ To list the contents of a wheel (using Python):
64
+
65
+ ```powershell
66
+ python - <<'PY'
67
+ import zipfile
68
+ w = r".\dist\your-built-wheel.whl" # replace with the actual file
69
+ z = zipfile.ZipFile(w)
70
+ print('\n'.join(z.namelist()))
71
+ PY
72
+ ```
73
+
74
+ 4) Test install in a fresh venv (use the same interpreter you built for)
75
+
76
+ ```powershell
77
+ "C:\Path\To\Target\python.exe" -m venv .\test_env
78
+ .\test_env\Scripts\python.exe -m pip install --upgrade pip
79
+ .\test_env\Scripts\python.exe -m pip install .\dist\your-built-wheel.whl
80
+ .\test_env\Scripts\python.exe -c "import pywinGUI; import pywinGUI.controller as controller; print('OK', controller)"
81
+ ```
82
+
83
+ Publishing to PyPI (local)
84
+
85
+ 1) Set token in environment (temporary for current PowerShell session):
86
+
87
+ ```powershell
88
+ $env:PYPI_API_TOKEN = 'pypi-<your-token-here>'
89
+ # or the less-preferred variable used by older scripts
90
+ $env:TWINE_PASSWORD = 'pypi-<your-token-here>'
91
+ ```
92
+
93
+ 2) Run the push script (it will install twine into the project's venv and upload):
94
+
95
+ ```powershell
96
+ .\build_tools\push.ps1
97
+ ```
98
+
99
+ GitHub Actions (automated build & publish)
100
+
101
+ What the workflow does
102
+ - For each Python version and architecture in the matrix it:
103
+ - Checks out the repo
104
+ - Sets up Python (x86/x64)
105
+ - Installs build dependencies (nuitka, wheel, setuptools)
106
+ - Runs `make_nuitka_wheel.ps1` to build a wheel
107
+ - Uploads the built wheel(s) as an artifact for inspection
108
+ - If the workflow run is triggered by a pushed tag (e.g. `v1.2.3`) and `PYPI_API_TOKEN` is set as a repository secret, the workflow will run `twine` to upload `dist/*` to PyPI.
109
+
110
+ One-time setup on GitHub
111
+ 1. Create a PyPI API token at https://pypi.org (Account → API tokens).
112
+ 2. In GitHub, go to the repository: Settings → Secrets and variables → Actions → New repository secret
113
+ - Name: `PYPI_API_TOKEN`
114
+ - Value: (the token you copied from PyPI)
115
+
116
+ Triggering a publish
117
+ - To test the workflow without publishing, run the workflow manually from Actions → your workflow → Run workflow.
118
+ - To publish to PyPI, push a tag. Example:
119
+
120
+ ```powershell
121
+ git add .
122
+ git commit -m "release prep"
123
+ git tag v1.0.0
124
+ git push origin main
125
+ git push origin v1.0.0
126
+ ```
127
+
128
+ ## Versioning
129
+
130
+ The build scripts set a `SMART_VERSION` environment variable that `setup_build_pkg.py` reads and uses as the package version when building a wheel. By default `make_nuitka_wheel.ps1` generates a timestamp-based PEP-440-friendly version to keep builds unique (useful for automated builds).
131
+
132
+ You can control the version in three ways:
133
+
134
+ 1) Let the build produce a timestamped version (default)
135
+ - This happens automatically when you run `make_nuitka_wheel.ps1` without `-Version`. The script sets `SMART_VERSION` to a value like `2026.1.2.10.5+2026.01.02.10.05` (format keeps it PEP-440 compatible while preserving a raw timestamp suffix).
136
+
137
+ 2) Provide an explicit version when running the build script
138
+ - Use the `-Version` parameter to set a specific PEP-440 compliant version string. Example:
139
+
140
+ ```powershell
141
+ # Set the build version explicitly
142
+ .\build_tools\make_nuitka_wheel.ps1 -PythonExe "C:\Path\To\python.exe" -Version "1.2.3"
143
+ ```
144
+
145
+ - The provided `-Version` value overrides the generated timestamp and is exported as `SMART_VERSION` for the wheel build.
146
+
147
+ 3) In CI (recommended for releases): use the git tag as the version
148
+ - When publishing releases from CI you typically want the wheel version to match the git tag (for example `v1.2.3` or `1.2.3`). You can pass the tag name into the build script by supplying `-Version` or by exporting `SMART_VERSION` in the runner environment.
149
+
150
+ Example (GitHub Actions step) — pass the tag name into the build script:
151
+
152
+ ```yaml
153
+ - name: Build wheel (Nuitka)
154
+ shell: pwsh
155
+ run: |
156
+ $py = (Get-Command python).Source
157
+ $ver = '${{ github.ref_name }}' # e.g. 'v1.2.3' or '1.2.3'
158
+ Write-Host "Building wheel for version: $ver"
159
+ .\build_tools\make_nuitka_wheel.ps1 -PythonExe $py -Version $ver
160
+ ```
161
+
162
+ Notes on version format
163
+ - Use a PEP-440 compliant version string (for example: `1.2.3`, `1.2.3.post1`, `1.2.3rc1`). Avoid spaces or characters that are illegal in wheel metadata.
164
+ - If you use git tags prefixed with `v` (`v1.2.3`) and prefer to drop the `v`, strip it in CI before passing to `-Version` (for example trim the leading `v` in the script or set `-Version ${{ github.ref_name | replace('v','') }}`).
165
+
166
+ How `setup_build_pkg.py` reads the version
167
+ - `setup_build_pkg.py` uses `os.environ.get('SMART_VERSION', '0.0.0')` as the package `version`. The `make_nuitka_wheel.ps1` script sets `SMART_VERSION` before invoking `setup_build_pkg.py`, so the wheel will carry the `SMART_VERSION` value.
168
+
169
+ Troubleshooting
170
+ - If you see `0.0.0` in the built wheel metadata, `SMART_VERSION` was not set in the environment at package-build time. Confirm you invoked `make_nuitka_wheel.ps1` (it sets `SMART_VERSION`) and that `setup_build_pkg.py` is executed in the same process/venv context.
171
+ - If a wheel is already published with an identical version, PyPI rejects the upload; ensure you increment the version for each published release.
172
+
173
+ Notes & troubleshooting
174
+ - Make sure you build wheels on Windows for Windows wheels. The GitHub Actions workflow uses `runs-on: windows-latest`.
175
+ - Ensure you build one wheel per ABI. For Windows you typically need both win32 and win_amd64 if you support 32-bit and 64-bit Python users.
176
+ - If a user reports "No module named 'pywinGUI.controller'" after installing from PyPI:
177
+ 1. Ask them to run `python -c "import platform,sys; print(sys.executable, platform.python_version(), platform.architecture())"` and `python -m pip show -f pywinGUI`.
178
+ 2. Verify they installed the wheel matching their Python bitness. If not, provide the correct wheel or publish both ABI wheels.
179
+ 3. If the installed package has an incorrectly named file (e.g. `_init_.py`), remove the package folder and reinstall.
180
+
181
+ CI considerations
182
+ - If Nuitka or compiled code requires MSVC or other build tools on the runner, add the installation steps in the workflow (Chocolatey or Visual Studio Build Tools) before running the build script.
183
+ - The workflow currently publishes only on tag pushes. You can adjust it to publish on a release or add manual approvals.
184
+
185
+ Contact
186
+ - If a build fails or a wheel raises import errors on a target interpreter, collect the following and open an issue:
187
+ - The wheel filename
188
+ - The output of `python -c "import platform,sys; print(sys.executable, platform.python_version(), platform.architecture())"` on the failing machine
189
+ - The output of `python -m pip show -f pywinGUI`
190
+ - Any traceback from attempting to `import pywinGUI.controller`
191
+
192
+ ---
193
+
194
+ This README is intentionally minimal and focused on build and release flow. If you want, I can:
195
+ - Add a short `RELEASE.md` with step-by-step release checklist and gating rules.
196
+ - Create a GitHub Actions job that requires manual approval before upload.
197
+ - Add `cibuildwheel` usage for cross-platform future support.
198
+
199
+ Which of these would you like next?
@@ -0,0 +1,9 @@
1
+ pywinGUI/__init__.py,sha256=vTfrDoOtqySoS9CrkOs10FRMdgd9bciiuXCOfd5yhTM,139
2
+ pywinGUI/ai_agent_error_engine.cp312-win_amd64.pyd,sha256=M1Dlp3034aWCzj7fq7vOArBCQfPw3ytZ1VD41HWGz2o,238080
3
+ pywinGUI/controller.cp312-win_amd64.pyd,sha256=hdDm10vEDFuzqcxr9m3RBnM1iy2uzncrHmp3k1LF4ts,697856
4
+ pywinGUI/runtime_guard.cp312-win_amd64.pyd,sha256=fr0dOUMFi21lyyupBTzf7uZxUj2YKwXq2-1gKvBOl8Q,262656
5
+ pywinGUI/win32_child_error_handler.cp312-win_amd64.pyd,sha256=Km2G_hjj_I8qSByDzzHQa_5Qhksh7MrAyPAwL_AVgdE,246272
6
+ pywingui-4.2.0.dist-info/METADATA,sha256=U_AXmla7MDxs9es1g29DxLUjg4EU6hdBDN1TrPXxq8Q,10009
7
+ pywingui-4.2.0.dist-info/WHEEL,sha256=A9QmVZcVMtxpTEJ3aTQnSUCh83XzDxlFoGXUp4TAsK8,99
8
+ pywingui-4.2.0.dist-info/top_level.txt,sha256=F7yNrWQLy6bc_i3v1Wq6sBq_Q8r89-NAvL7RnSfD2qI,9
9
+ pywingui-4.2.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: cp312-none-win_amd64
5
+
@@ -0,0 +1 @@
1
+ pywinGUI