seiya 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.
Files changed (109) hide show
  1. seiya-1.0.0/LICENSE +33 -0
  2. seiya-1.0.0/PKG-INFO +385 -0
  3. seiya-1.0.0/README.md +347 -0
  4. seiya-1.0.0/README.rst +52 -0
  5. seiya-1.0.0/nsist/__init__.py +682 -0
  6. seiya-1.0.0/nsist/__main__.py +2 -0
  7. seiya-1.0.0/nsist/_system_path.py +204 -0
  8. seiya-1.0.0/nsist/commands.py +75 -0
  9. seiya-1.0.0/nsist/configreader.py +250 -0
  10. seiya-1.0.0/nsist/copymodules.py +384 -0
  11. seiya-1.0.0/nsist/glossyorb.ico +0 -0
  12. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-console-l1-1-0.dll +0 -0
  13. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-datetime-l1-1-0.dll +0 -0
  14. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-debug-l1-1-0.dll +0 -0
  15. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-errorhandling-l1-1-0.dll +0 -0
  16. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-file-l1-1-0.dll +0 -0
  17. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-file-l1-2-0.dll +0 -0
  18. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-file-l2-1-0.dll +0 -0
  19. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-handle-l1-1-0.dll +0 -0
  20. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-heap-l1-1-0.dll +0 -0
  21. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-interlocked-l1-1-0.dll +0 -0
  22. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-libraryloader-l1-1-0.dll +0 -0
  23. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-localization-l1-2-0.dll +0 -0
  24. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-memory-l1-1-0.dll +0 -0
  25. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-namedpipe-l1-1-0.dll +0 -0
  26. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-processenvironment-l1-1-0.dll +0 -0
  27. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-processthreads-l1-1-0.dll +0 -0
  28. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-processthreads-l1-1-1.dll +0 -0
  29. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-profile-l1-1-0.dll +0 -0
  30. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-rtlsupport-l1-1-0.dll +0 -0
  31. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-string-l1-1-0.dll +0 -0
  32. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-synch-l1-1-0.dll +0 -0
  33. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-synch-l1-2-0.dll +0 -0
  34. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-sysinfo-l1-1-0.dll +0 -0
  35. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-timezone-l1-1-0.dll +0 -0
  36. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-core-util-l1-1-0.dll +0 -0
  37. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-conio-l1-1-0.dll +0 -0
  38. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-convert-l1-1-0.dll +0 -0
  39. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-environment-l1-1-0.dll +0 -0
  40. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-filesystem-l1-1-0.dll +0 -0
  41. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-heap-l1-1-0.dll +0 -0
  42. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-locale-l1-1-0.dll +0 -0
  43. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-math-l1-1-0.dll +0 -0
  44. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-multibyte-l1-1-0.dll +0 -0
  45. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-private-l1-1-0.dll +0 -0
  46. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-process-l1-1-0.dll +0 -0
  47. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-runtime-l1-1-0.dll +0 -0
  48. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-stdio-l1-1-0.dll +0 -0
  49. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-string-l1-1-0.dll +0 -0
  50. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-time-l1-1-0.dll +0 -0
  51. seiya-1.0.0/nsist/msvcrt/x64/api-ms-win-crt-utility-l1-1-0.dll +0 -0
  52. seiya-1.0.0/nsist/msvcrt/x64/ucrtbase.dll +0 -0
  53. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-console-l1-1-0.dll +0 -0
  54. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-datetime-l1-1-0.dll +0 -0
  55. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-debug-l1-1-0.dll +0 -0
  56. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-errorhandling-l1-1-0.dll +0 -0
  57. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-file-l1-1-0.dll +0 -0
  58. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-file-l1-2-0.dll +0 -0
  59. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-file-l2-1-0.dll +0 -0
  60. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-handle-l1-1-0.dll +0 -0
  61. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-heap-l1-1-0.dll +0 -0
  62. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-interlocked-l1-1-0.dll +0 -0
  63. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-libraryloader-l1-1-0.dll +0 -0
  64. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-localization-l1-2-0.dll +0 -0
  65. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-memory-l1-1-0.dll +0 -0
  66. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-namedpipe-l1-1-0.dll +0 -0
  67. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-processenvironment-l1-1-0.dll +0 -0
  68. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-processthreads-l1-1-0.dll +0 -0
  69. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-processthreads-l1-1-1.dll +0 -0
  70. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-profile-l1-1-0.dll +0 -0
  71. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-rtlsupport-l1-1-0.dll +0 -0
  72. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-string-l1-1-0.dll +0 -0
  73. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-synch-l1-1-0.dll +0 -0
  74. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-synch-l1-2-0.dll +0 -0
  75. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-sysinfo-l1-1-0.dll +0 -0
  76. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-timezone-l1-1-0.dll +0 -0
  77. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-core-util-l1-1-0.dll +0 -0
  78. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-conio-l1-1-0.dll +0 -0
  79. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-convert-l1-1-0.dll +0 -0
  80. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-environment-l1-1-0.dll +0 -0
  81. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-filesystem-l1-1-0.dll +0 -0
  82. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-heap-l1-1-0.dll +0 -0
  83. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-locale-l1-1-0.dll +0 -0
  84. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-math-l1-1-0.dll +0 -0
  85. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-multibyte-l1-1-0.dll +0 -0
  86. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-private-l1-1-0.dll +0 -0
  87. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-process-l1-1-0.dll +0 -0
  88. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-runtime-l1-1-0.dll +0 -0
  89. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-stdio-l1-1-0.dll +0 -0
  90. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-string-l1-1-0.dll +0 -0
  91. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-time-l1-1-0.dll +0 -0
  92. seiya-1.0.0/nsist/msvcrt/x86/api-ms-win-crt-utility-l1-1-0.dll +0 -0
  93. seiya-1.0.0/nsist/msvcrt/x86/ucrtbase.dll +0 -0
  94. seiya-1.0.0/nsist/msvcrt/x86/x86.zip +0 -0
  95. seiya-1.0.0/nsist/nsiswriter.py +71 -0
  96. seiya-1.0.0/nsist/pyapp.nsi +265 -0
  97. seiya-1.0.0/nsist/pyapp_msvcrt.nsi +14 -0
  98. seiya-1.0.0/nsist/util.py +290 -0
  99. seiya-1.0.0/nsist/wheels.py +425 -0
  100. seiya-1.0.0/pyproject.toml +68 -0
  101. seiya-1.0.0/seiya/__init__.py +60 -0
  102. seiya-1.0.0/seiya/__main__.py +5 -0
  103. seiya-1.0.0/seiya.egg-info/PKG-INFO +385 -0
  104. seiya-1.0.0/seiya.egg-info/SOURCES.txt +107 -0
  105. seiya-1.0.0/seiya.egg-info/dependency_links.txt +1 -0
  106. seiya-1.0.0/seiya.egg-info/entry_points.txt +3 -0
  107. seiya-1.0.0/seiya.egg-info/requires.txt +12 -0
  108. seiya-1.0.0/seiya.egg-info/top_level.txt +2 -0
  109. seiya-1.0.0/setup.cfg +4 -0
seiya-1.0.0/LICENSE ADDED
@@ -0,0 +1,33 @@
1
+ Files
2
+ -----
3
+
4
+ nsist/glossyorb.ico is under a CC Attribution 3.0 License, by "Mysitemyway.com", from
5
+ http://www.iconarchive.com/show/clean-3d-icons-by-mysitemyway/glossy-3d-blue-orbs2-112-icon.html
6
+
7
+ nsist/_system_path.py is under the BSD license, as shown in that file.
8
+
9
+ Other files in this repo are under the MIT license below.
10
+
11
+ The MIT License
12
+ ---------------
13
+
14
+ Copyright (c) 2014 Thomas Kluyver
15
+ Copyright (c) 2026 Seiya Contributors
16
+
17
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
18
+ this software and associated documentation files (the "Software"), to deal in
19
+ the Software without restriction, including without limitation the rights to
20
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
21
+ the Software, and to permit persons to whom the Software is furnished to do so,
22
+ subject to the following conditions:
23
+
24
+ The above copyright notice and this permission notice shall be included in all
25
+ copies or substantial portions of the Software.
26
+
27
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
29
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
30
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
31
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
32
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33
+
seiya-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,385 @@
1
+ Metadata-Version: 2.4
2
+ Name: seiya
3
+ Version: 1.0.0
4
+ Summary: Enhanced Python Windows Installer Builder - fork of pynsist with .exe launchers, auto dependency resolution and custom logo support
5
+ Author: Seiya Contributors
6
+ Maintainer: Seiya Contributors
7
+ License: MIT
8
+ Project-URL: Homepage, https://github.com/tedelon/Seiya
9
+ Project-URL: Documentation, https://github.com/tedelon/Seiya#readme
10
+ Project-URL: Source, https://github.com/tedelon/Seiya
11
+ Project-URL: Issues, https://github.com/tedelon/Seiya/issues
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Environment :: Win32 (MS Windows)
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Software Development
22
+ Classifier: Topic :: System :: Installation/Setup
23
+ Classifier: Topic :: System :: Software Distribution
24
+ Requires-Python: >=3.8
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: requests
28
+ Requires-Dist: jinja2
29
+ Requires-Dist: yarg
30
+ Requires-Dist: distlib>=0.3
31
+ Provides-Extra: image
32
+ Requires-Dist: Pillow>=9.0.0; extra == "image"
33
+ Provides-Extra: test
34
+ Requires-Dist: testpath; extra == "test"
35
+ Requires-Dist: responses; extra == "test"
36
+ Requires-Dist: pytest; extra == "test"
37
+ Dynamic: license-file
38
+
39
+ # Seiya
40
+
41
+ **Enhanced Python Windows Installer Builder**
42
+
43
+ > **Fork Notice**: Seiya is a derivative work based on [pynsist](https://github.com/takluyver/pynsist) by Thomas Kluyver, distributed under the MIT License. Original copyright © 2014 Thomas Kluyver. Seiya modifications copyright © 2026 Seiya Contributors. See [LICENSE](LICENSE) for full copyright and license text. Seiya is **not** affiliated with or endorsed by the original pynsist project — it is an independent enhanced fork. The `pynsist` command is preserved solely for backward compatibility with existing user config files.
44
+
45
+ Seiya is an enhanced fork of [pynsist](https://github.com/takluyver/pynsist) that builds Windows installers for Python applications. It bundles Python itself, so you can distribute your application to users who don't have Python installed.
46
+
47
+ ## Key Enhancements
48
+
49
+ | Feature | Description |
50
+ |---------|-------------|
51
+ | **`.exe` Launchers** | Generates standalone `.exe` launchers using the distlib launcher mechanism (replaces `.launch.pyw` scripts) |
52
+ | **Auto Dependency Resolution** | Only list direct dependencies — transitive dependencies are automatically resolved via `importlib.metadata` |
53
+ | **Custom Logo Support** | Supports PNG, JPG, ICO, BMP, GIF, WEBP image formats as application logos (auto-converted to ICO) |
54
+ | **Platform Filtering** | Automatically excludes macOS/Linux-only dependencies (e.g. `pyobjc-*`) via PEP 508 markers |
55
+ | **Metadata Preservation** | Copies `.dist-info` directories so `importlib.metadata` works at runtime |
56
+ | **Backward Compatible** | Existing `pynsist` config files and commands work unchanged |
57
+
58
+ ## Quick Start
59
+
60
+ ### 1. Install Seiya
61
+
62
+ ```bash
63
+ pip install seiya
64
+ # Or with image format support (JPG, BMP, GIF, WEBP):
65
+ pip install "seiya[image]"
66
+ ```
67
+
68
+ ### 2. Install NSIS
69
+
70
+ Download and install [NSIS](http://nsis.sourceforge.net/Download).
71
+
72
+ ### 3. Write a Config File
73
+
74
+ Create `installer.cfg`:
75
+
76
+ ```ini
77
+ [Application]
78
+ name=MyApp
79
+ version=1.0
80
+ entry_point=myapp:main
81
+ logo=mylogo.png
82
+
83
+ [Python]
84
+ version=3.12.10
85
+ bitness=64
86
+ format=bundled
87
+
88
+ [Include]
89
+ packages=flask
90
+ webview
91
+ ```
92
+
93
+ ### 4. Build the Installer
94
+
95
+ ```bash
96
+ seiya installer.cfg
97
+ # Or equivalently:
98
+ python -m seiya installer.cfg
99
+ # Backward compatible:
100
+ pynsist installer.cfg
101
+ ```
102
+
103
+ This generates `build/nsis/MyApp_1.0.exe` — a complete Windows installer that bundles Python and all dependencies.
104
+
105
+ ## Custom Logo
106
+
107
+ Seiya supports multiple image formats as application logos. The `logo` option (alias for `icon`) automatically converts images to ICO format:
108
+
109
+ ```ini
110
+ [Application]
111
+ name=MyApp
112
+ version=1.0
113
+ entry_point=myapp:main
114
+ logo=mylogo.png # PNG (recommended, supports transparency)
115
+ # or
116
+ logo=mylogo.jpg # JPG (requires Pillow)
117
+ # or
118
+ logo=mylogo.ico # ICO (used directly, no conversion)
119
+ ```
120
+
121
+ | Format | Extension | Pillow Required | Notes |
122
+ |--------|-----------|-----------------|-------|
123
+ | ICO | `.ico` | No | Used directly, no conversion |
124
+ | PNG | `.png` | No (recommended) | Auto-converted to multi-size ICO |
125
+ | JPEG | `.jpg/.jpeg` | Yes | Requires Pillow |
126
+ | BMP | `.bmp` | Yes | Requires Pillow |
127
+ | GIF | `.gif` | Yes | Requires Pillow |
128
+ | WEBP | `.webp` | Yes | Requires Pillow |
129
+
130
+ Install Pillow for full format support:
131
+
132
+ ```bash
133
+ pip install Pillow
134
+ ```
135
+
136
+ ## Auto Dependency Resolution
137
+
138
+ Only list your **direct dependencies** in the config file. Seiya automatically resolves all transitive dependencies:
139
+
140
+ ```ini
141
+ [Include]
142
+ packages=flask
143
+ webview
144
+ ```
145
+
146
+ Seiya will automatically include:
147
+ - `flask` → `jinja2`, `werkzeug`, `click`, `itsdangerous`, `markupsafe`, `blinker`
148
+ - `webview` → `bottle`, `proxy_tools`, `pythonnet`, `clr_loader`, `cffi`, `typing_extensions`
149
+ - `cffi` → `pycparser`
150
+ - And all their `.dist-info` metadata directories
151
+
152
+ Platform-specific dependencies (e.g. `pyobjc-*` on macOS) are automatically filtered out via PEP 508 markers.
153
+
154
+ ## Configuration Reference
155
+
156
+ ### [Application] Section
157
+
158
+ | Option | Required | Description |
159
+ |--------|----------|-------------|
160
+ | `name` | Yes | Application name |
161
+ | `version` | Yes | Application version |
162
+ | `publisher` | No | Publisher name |
163
+ | `entry_point` | No | Entry point as `module:function` |
164
+ | `script` | No | Launch script path (alternative to `entry_point`) |
165
+ | `logo` | No | Custom logo — supports PNG/JPG/ICO/BMP/GIF/WEBP |
166
+ | `icon` | No | Alias for `logo` (`logo` takes precedence) |
167
+ | `console` | No | `true` to show console window (default: `false`) |
168
+ | `license_file` | No | License file path |
169
+ | `extra_preamble` | No | Extra Python code to run before entry point |
170
+
171
+ ### [Python] Section
172
+
173
+ | Option | Required | Description |
174
+ |--------|----------|-------------|
175
+ | `version` | No | Python version (recommend `3.12.10`) |
176
+ | `bitness` | No | `32` or `64` (default: `64`) |
177
+ | `format` | No | Must be `bundled` |
178
+ | `include_msvcrt` | No | Include MSVC runtime (default: `true`) |
179
+
180
+ ### [Include] Section
181
+
182
+ | Option | Required | Description |
183
+ |--------|----------|-------------|
184
+ | `packages` | No | Direct dependencies (transitive deps auto-resolved) |
185
+ | `pypi_wheels` | No | PyPI wheel specs to download |
186
+ | `local_wheels` | No | Local wheel file paths |
187
+ | `files` | No | Extra files as `source>destination` |
188
+ | `exclude` | No | File patterns to exclude |
189
+
190
+ ### [Build] Section
191
+
192
+ | Option | Required | Description |
193
+ |--------|----------|-------------|
194
+ | `directory` | No | Build directory (default: `build/nsis`) |
195
+ | `installer_name` | No | Installer filename |
196
+ | `nsi_template` | No | Custom NSI template path |
197
+
198
+ ### [Shortcut *name*] Section (Optional)
199
+
200
+ Defines additional shortcuts. Same options as [Application].
201
+
202
+ ### [Command *name*] Section (Optional)
203
+
204
+ Defines command-line tools added to PATH.
205
+
206
+ | Option | Required | Description |
207
+ |--------|----------|-------------|
208
+ | `entry_point` | Yes | Entry point as `module:function` |
209
+ | `console` | No | Default: `true` |
210
+ | `extra_preamble` | No | Extra Python code file |
211
+
212
+ ## How It Works
213
+
214
+ ### .exe Launcher Structure
215
+
216
+ Each generated `.exe` launcher consists of three parts:
217
+
218
+ ```
219
+ [distlib launcher exe] + [shebang] + [zip(__main__.py)]
220
+ ```
221
+
222
+ 1. **Launcher EXE** — Base launcher from distlib (`t64.exe` for console, `w64.exe` for GUI)
223
+ 2. **Shebang** — `#!Python\pythonw.exe\r\n` (relative path to Python interpreter)
224
+ 3. **ZIP** — Contains `__main__.py` that sets up `sys.path` and calls the entry function
225
+
226
+ ### Dependency Resolution Flow
227
+
228
+ ```
229
+ User lists: packages=[flask, webview]
230
+
231
+ resolve_dependencies() reads importlib.metadata
232
+
233
+ Recursively resolves 'requires' field
234
+
235
+ PEP 508 markers filter platform-specific deps
236
+
237
+ copy_modules() + _copy_dist_info()
238
+ ```
239
+
240
+ ### Logo Conversion Flow
241
+
242
+ ```
243
+ logo=mylogo.png
244
+
245
+ ensure_valid_icon() detects format
246
+
247
+ ├── ICO: used directly
248
+ ├── PNG: png_to_ico() (Pillow or wrapper)
249
+ └── JPG/other: _convert_with_pillow() (requires Pillow)
250
+
251
+ Generates <name>_converted.ico (original file unchanged)
252
+ ```
253
+
254
+ ## Examples
255
+
256
+ The `examples/` directory contains sample projects:
257
+
258
+ - **console/** — Console application with custom logos (PNG/JPG/ICO test configs)
259
+ - **pyqt5/** — PyQt5 GUI application
260
+ - **pywebview/** — pywebview simple browser
261
+ - **pygame/** — Pygame example
262
+ - **streamlit/** — Streamlit app packaging
263
+
264
+ Run an example:
265
+
266
+ ```bash
267
+ cd examples/console
268
+ seiya installer_logo_png.cfg
269
+ ```
270
+
271
+ ## Build Output Structure
272
+
273
+ After running `seiya installer.cfg`, the `build/nsis/` directory contains:
274
+
275
+ ```
276
+ build/nsis/
277
+ ├── MyApp.exe # Generated .exe launcher
278
+ ├── MyApp_1.0.exe # NSIS installer package
279
+ ├── installer.nsi # NSIS script
280
+ ├── <logo>_converted.ico # Converted ICO (if source was PNG/JPG)
281
+ ├── Python/ # Embedded Python
282
+ │ ├── python.exe
283
+ │ ├── pythonw.exe
284
+ │ └── ...
285
+ ├── pkgs/ # All Python packages
286
+ │ ├── flask/
287
+ │ ├── jinja2/ # Auto-resolved transitive dep
288
+ │ ├── flask-3.0.0.dist-info/ # Metadata directory
289
+ │ └── ...
290
+ └── msvcrt/ # MSVC runtime (optional)
291
+ ```
292
+
293
+ ## Installation
294
+
295
+ ### From PyPI
296
+
297
+ ```bash
298
+ pip install seiya
299
+ pip install "seiya[image]" # With JPG/BMP/GIF/WEBP support
300
+ ```
301
+
302
+ ### From Source
303
+
304
+ ```bash
305
+ git clone https://github.com/seiya-builder/seiya.git
306
+ cd seiya
307
+ pip install -e .
308
+ ```
309
+
310
+ ### Requirements
311
+
312
+ - Python 3.8+
313
+ - NSIS (for building installers)
314
+ - Optional: Pillow (for JPG/BMP/GIF/WEBP logo support)
315
+
316
+ ## Compatibility
317
+
318
+ Seiya is fully backward compatible with pynsist:
319
+
320
+ - ✅ All config file formats (`[Application]`, `[Python]`, `[Include]`, `[Build]`, `[Shortcut]`, `[Command]`)
321
+ - ✅ `entry_point` and `script` launch methods
322
+ - ✅ `pypi_wheels` and `local_wheels` dependency acquisition
323
+ - ✅ Custom NSI templates
324
+ - ✅ Extra files inclusion
325
+ - ✅ License files
326
+ - ✅ Multiple shortcuts
327
+ - ✅ Command-line tools (`[Command]` sections)
328
+ - ✅ The `pynsist` command still works as an alias
329
+
330
+ **New features added by Seiya:**
331
+ - 🆕 `seiya` command (in addition to `pynsist`)
332
+ - 🆕 `logo=` config option (alias for `icon=`, supports more formats)
333
+ - 🆕 PNG/JPG/BMP/GIF/WEBP auto-conversion to ICO
334
+ - 🆕 Auto transitive dependency resolution
335
+ - 🆕 Platform-specific dependency filtering
336
+ - 🆕 `.dist-info` metadata auto-copy
337
+ - 🆕 `.exe` launchers (replaces `.launch.pyw`)
338
+
339
+ ## FAQ
340
+
341
+ ### "invalid icon file" error
342
+
343
+ This error occurs with original pynsist when using PNG/JPG images. Seiya automatically converts image formats to ICO, so this error should not occur. Install Pillow for full format support: `pip install Pillow`.
344
+
345
+ ### JPG conversion fails
346
+
347
+ JPG conversion requires Pillow. Install it: `pip install Pillow`.
348
+
349
+ ### `ModuleNotFoundError` at runtime
350
+
351
+ Check that all direct dependencies are listed in `packages=`. Transitive dependencies should be auto-resolved; if not, verify the package metadata is intact in your Python environment.
352
+
353
+ ### `PackageNotFoundError: No package metadata was found for xxx`
354
+
355
+ Seiya auto-copies `.dist-info` directories. If this error persists, verify the package is properly installed in your build environment.
356
+
357
+ ### Build directory locked (`FileExistsError`)
358
+
359
+ Stop any processes using the build directory and remove it:
360
+
361
+ ```powershell
362
+ Get-Process | Where-Object { $_.Name -match "AppName|pythonw" } | Stop-Process -Force
363
+ Remove-Item -Recurse -Force "build/nsis"
364
+ ```
365
+
366
+ ## License
367
+
368
+ MIT License — see [LICENSE](LICENSE).
369
+
370
+ - Original pynsist code: Copyright © 2014 Thomas Kluyver
371
+ - Seiya modifications: Copyright © 2026 Seiya Contributors
372
+
373
+ This project reuses code from the following third-party projects under their respective licenses:
374
+ - [pynsist](https://github.com/takluyver/pynsist) (MIT) by Thomas Kluyver
375
+ - [distlib](https://bitbucket.org/pypa/distlib) (Python Software Foundation License) — provides launcher EXE binaries
376
+ - `nsist/_system_path.py` (BSD license) — see file header for details
377
+ - `nsist/glossyorb.ico` (CC Attribution 3.0) — by Mysitemyway.com
378
+
379
+ ## Acknowledgments
380
+
381
+ Seiya is based on [pynsist](https://github.com/takluyver/pynsist) by Thomas Kluyver. Thanks to the pynsist contributors and the distlib project for the launcher mechanism.
382
+
383
+ ## Disclaimer
384
+
385
+ Seiya is an independent project and is **not** affiliated with, endorsed by, or sponsored by the original pynsist project or its author. The `pynsist` command-line entry point is provided solely for backward compatibility with existing user configuration files, and does not imply any relationship with the original project. All trademarks belong to their respective owners.