fspack 0.2.2__tar.gz → 0.2.4__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 (200) hide show
  1. {fspack-0.2.2 → fspack-0.2.4}/.bumpversion.toml +1 -1
  2. fspack-0.2.4/.github/workflows/release.yml +232 -0
  3. {fspack-0.2.2 → fspack-0.2.4}/PKG-INFO +14 -1
  4. {fspack-0.2.2 → fspack-0.2.4}/README.md +13 -0
  5. {fspack-0.2.2 → fspack-0.2.4}/docs/integration.md +27 -0
  6. {fspack-0.2.2 → fspack-0.2.4}/pyproject.toml +1 -1
  7. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/__init__.py +1 -1
  8. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/slim/__init__.py +0 -4
  9. {fspack-0.2.2 → fspack-0.2.4}/uv.lock +1 -1
  10. fspack-0.2.2/.github/workflows/release.yml +0 -44
  11. {fspack-0.2.2 → fspack-0.2.4}/.copier-answers.yml +0 -0
  12. {fspack-0.2.2 → fspack-0.2.4}/.coveragerc +0 -0
  13. {fspack-0.2.2 → fspack-0.2.4}/.github/workflows/ci.yml +0 -0
  14. {fspack-0.2.2 → fspack-0.2.4}/.gitignore +0 -0
  15. {fspack-0.2.2 → fspack-0.2.4}/.pre-commit-config.yaml +0 -0
  16. {fspack-0.2.2 → fspack-0.2.4}/.python-version +0 -0
  17. {fspack-0.2.2 → fspack-0.2.4}/.readthedocs.yaml +0 -0
  18. {fspack-0.2.2 → fspack-0.2.4}/.trae/.ignore +0 -0
  19. {fspack-0.2.2 → fspack-0.2.4}/.trae/docs/iter-30-slim-strip-exts.md +0 -0
  20. {fspack-0.2.2 → fspack-0.2.4}/.trae/docs/iter-31-favicon-auto-icon.md +0 -0
  21. {fspack-0.2.2 → fspack-0.2.4}/.trae/docs/iter-32-code-cleanup-and-refactor.md +0 -0
  22. {fspack-0.2.2 → fspack-0.2.4}/.trae/docs/iter-33-win7-compat-dll.md +0 -0
  23. {fspack-0.2.2 → fspack-0.2.4}/.trae/docs/iter-34-slim-stages-and-precompile.md +0 -0
  24. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-06-docs-quality.md +0 -0
  25. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-07-linux-installer.md +0 -0
  26. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-08-linux-wheel-platform.md +0 -0
  27. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-09-rich-progress-and-run-fix.md +0 -0
  28. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-10-loader-cache-and-download-stats.md +0 -0
  29. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-11-wheel-cache-no-index.md +0 -0
  30. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-12-deps-cache-and-runtime-split.md +0 -0
  31. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-13-examples-integration.md +0 -0
  32. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-14-declared-deps-priority.md +0 -0
  33. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-15-tk-pack-limitation-doc.md +0 -0
  34. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-17-dataclass-method-sink.md +0 -0
  35. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-18-multi-entry.md +0 -0
  36. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-19-/346/211/223/345/214/205/345/212/237/350/203/275.md" +0 -0
  37. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-19-/347/256/200/345/214/226.md" +0 -0
  38. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-20-slim-source-exclude.md +0 -0
  39. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-21-examples-slow-test.md +0 -0
  40. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-22-slim-package.md +0 -0
  41. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-23-sci-slim.md +0 -0
  42. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-24-tkinter-builtin-packing.md +0 -0
  43. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-25-favicon-auto-icon.md +0 -0
  44. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-26-code-cleanup-and-refactor.md +0 -0
  45. {fspack-0.2.2 → fspack-0.2.4}/.trae/req/done/req-27-win7-compat-dll.md +0 -0
  46. {fspack-0.2.2 → fspack-0.2.4}/.trae/rules/rule-01-/345/274/200/345/217/221/346/265/201/347/250/213.md" +0 -0
  47. {fspack-0.2.2 → fspack-0.2.4}/.trae/rules/rule-02-/344/272/247/347/211/251/347/272/246/346/235/237.md" +0 -0
  48. {fspack-0.2.2 → fspack-0.2.4}/.trae/rules/rule-03-/350/247/246/345/217/221/345/234/272/346/231/257.md" +0 -0
  49. {fspack-0.2.2 → fspack-0.2.4}/.trae/rules/rule-09-git/346/217/220/344/272/244/350/247/204/345/210/231.md" +0 -0
  50. {fspack-0.2.2 → fspack-0.2.4}/.trae/rules/rule-11-python-standards.md +0 -0
  51. {fspack-0.2.2 → fspack-0.2.4}/.trae/rules/rule-12-pyside-dev.md +0 -0
  52. {fspack-0.2.2 → fspack-0.2.4}/.trae/skills/python-class-design/SKILL.md +0 -0
  53. {fspack-0.2.2 → fspack-0.2.4}/.trae/skills/python-cli/SKILL.md +0 -0
  54. {fspack-0.2.2 → fspack-0.2.4}/.trae/skills/python-concurrency/SKILL.md +0 -0
  55. {fspack-0.2.2 → fspack-0.2.4}/.trae/skills/python-config/SKILL.md +0 -0
  56. {fspack-0.2.2 → fspack-0.2.4}/.trae/skills/python-file-io/SKILL.md +0 -0
  57. {fspack-0.2.2 → fspack-0.2.4}/.trae/skills/python-gui-pyside/LAYOUT.md +0 -0
  58. {fspack-0.2.2 → fspack-0.2.4}/.trae/skills/python-gui-pyside/PATTERNS.md +0 -0
  59. {fspack-0.2.2 → fspack-0.2.4}/.trae/skills/python-gui-pyside/SKILL.md +0 -0
  60. {fspack-0.2.2 → fspack-0.2.4}/.trae/skills/python-gui-pyside/UI-DESIGN.md +0 -0
  61. {fspack-0.2.2 → fspack-0.2.4}/.trae/skills/python-logging/SKILL.md +0 -0
  62. {fspack-0.2.2 → fspack-0.2.4}/.trae/skills/python-performance/SKILL.md +0 -0
  63. {fspack-0.2.2 → fspack-0.2.4}/.trae/skills/python-project-structure/SKILL.md +0 -0
  64. {fspack-0.2.2 → fspack-0.2.4}/.trae/skills/python-subprocess/SKILL.md +0 -0
  65. {fspack-0.2.2 → fspack-0.2.4}/.trae/skills/python-testing/SKILL.md +0 -0
  66. {fspack-0.2.2 → fspack-0.2.4}/.vscode/settings.json +0 -0
  67. {fspack-0.2.2 → fspack-0.2.4}/LICENSE +0 -0
  68. {fspack-0.2.2 → fspack-0.2.4}/Makefile +0 -0
  69. {fspack-0.2.2 → fspack-0.2.4}/docs/_static/.gitkeep +0 -0
  70. {fspack-0.2.2 → fspack-0.2.4}/docs/api.rst +0 -0
  71. {fspack-0.2.2 → fspack-0.2.4}/docs/changelog.rst +0 -0
  72. {fspack-0.2.2 → fspack-0.2.4}/docs/conf.py +0 -0
  73. {fspack-0.2.2 → fspack-0.2.4}/docs/index.rst +0 -0
  74. {fspack-0.2.2 → fspack-0.2.4}/examples/__init__.py +0 -0
  75. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/README.md +0 -0
  76. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/__init__.py +0 -0
  77. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/base_helloworld.py +0 -0
  78. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/core/__init__.py +0 -0
  79. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/core/module_e.py +0 -0
  80. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/core/module_f.py +0 -0
  81. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/core/module_g.py +0 -0
  82. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/mathtools/__init__.py +0 -0
  83. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/mathtools/algorithms.py +0 -0
  84. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/module_c.py +0 -0
  85. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/module_d.py +0 -0
  86. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/modules/__init__.py +0 -0
  87. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/modules/module_a.py +0 -0
  88. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/modules/module_b.py +0 -0
  89. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_complex/pyproject.toml +0 -0
  90. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_helloworld/helloworld.py +0 -0
  91. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_helloworld/pyproject.toml +0 -0
  92. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_office/README.md +0 -0
  93. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_office/__init__.py +0 -0
  94. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_office/base_office.py +0 -0
  95. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_office/pyproject.toml +0 -0
  96. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_tool/clitool.py +0 -0
  97. {fspack-0.2.2 → fspack-0.2.4}/examples/cli_tool/pyproject.toml +0 -0
  98. {fspack-0.2.2 → fspack-0.2.4}/examples/gui_calc/guicalc.py +0 -0
  99. {fspack-0.2.2 → fspack-0.2.4}/examples/gui_calc/pyproject.toml +0 -0
  100. {fspack-0.2.2 → fspack-0.2.4}/examples/multi_entry/.python-version +0 -0
  101. {fspack-0.2.2 → fspack-0.2.4}/examples/multi_entry/cli.py +0 -0
  102. {fspack-0.2.2 → fspack-0.2.4}/examples/multi_entry/gui.py +0 -0
  103. {fspack-0.2.2 → fspack-0.2.4}/examples/multi_entry/pyproject.toml +0 -0
  104. {fspack-0.2.2 → fspack-0.2.4}/examples/multi_entry/web.py +0 -0
  105. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_cli/pygame_cli.py +0 -0
  106. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_cli/pyproject.toml +0 -0
  107. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_conway/.python-version +0 -0
  108. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_conway/README.md +0 -0
  109. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_conway/__init__.py +0 -0
  110. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_conway/game.py +0 -0
  111. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_conway/pyproject.toml +0 -0
  112. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_gktetris/.python-version +0 -0
  113. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_gktetris/README.md +0 -0
  114. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_gktetris/__init__.py +0 -0
  115. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_gktetris/conf.py +0 -0
  116. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_gktetris/entities/__init__.py +0 -0
  117. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_gktetris/entities/animation.py +0 -0
  118. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_gktetris/entities/particle.py +0 -0
  119. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_gktetris/entities/piece.py +0 -0
  120. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_gktetris/game.py +0 -0
  121. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_gktetris/pyproject.toml +0 -0
  122. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_snake/pyproject.toml +0 -0
  123. {fspack-0.2.2 → fspack-0.2.4}/examples/pygame_snake/snake.py +0 -0
  124. {fspack-0.2.2 → fspack-0.2.4}/examples/pyqt5_cli/pyproject.toml +0 -0
  125. {fspack-0.2.2 → fspack-0.2.4}/examples/pyqt5_cli/pyqt5_cli.py +0 -0
  126. {fspack-0.2.2 → fspack-0.2.4}/examples/pyqt5_cli/uv.lock +0 -0
  127. {fspack-0.2.2 → fspack-0.2.4}/examples/pyside2_app/.python-version +0 -0
  128. {fspack-0.2.2 → fspack-0.2.4}/examples/pyside2_app/README.md +0 -0
  129. {fspack-0.2.2 → fspack-0.2.4}/examples/pyside2_app/pyproject.toml +0 -0
  130. {fspack-0.2.2 → fspack-0.2.4}/examples/pyside2_app/pyside2app.py +0 -0
  131. {fspack-0.2.2 → fspack-0.2.4}/examples/sci_matplotlib/matplotlib_demo.py +0 -0
  132. {fspack-0.2.2 → fspack-0.2.4}/examples/sci_matplotlib/pyproject.toml +0 -0
  133. {fspack-0.2.2 → fspack-0.2.4}/examples/sci_numpy/numpy_demo.py +0 -0
  134. {fspack-0.2.2 → fspack-0.2.4}/examples/sci_numpy/pyproject.toml +0 -0
  135. {fspack-0.2.2 → fspack-0.2.4}/examples/sci_scipy/pyproject.toml +0 -0
  136. {fspack-0.2.2 → fspack-0.2.4}/examples/sci_scipy/scipy_demo.py +0 -0
  137. {fspack-0.2.2 → fspack-0.2.4}/examples/tk_app/pyproject.toml +0 -0
  138. {fspack-0.2.2 → fspack-0.2.4}/examples/tk_app/tk_app.py +0 -0
  139. {fspack-0.2.2 → fspack-0.2.4}/examples/web_app/pyproject.toml +0 -0
  140. {fspack-0.2.2 → fspack-0.2.4}/examples/web_app/webapp.py +0 -0
  141. {fspack-0.2.2 → fspack-0.2.4}/pyrefly.toml +0 -0
  142. {fspack-0.2.2 → fspack-0.2.4}/pytest.ini +0 -0
  143. {fspack-0.2.2 → fspack-0.2.4}/ruff.toml +0 -0
  144. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/analyzer.py +0 -0
  145. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/assets/icons/app.ico +0 -0
  146. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/assets/icons/app.svg +0 -0
  147. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/assets/runtime/COPYING.LIB-api-ms-win-core-path.txt +0 -0
  148. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/assets/runtime/LICENSE-api-ms-win-core-path.txt +0 -0
  149. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/assets/runtime/api-ms-win-core-path-l1-1-0.dll +0 -0
  150. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/builder.py +0 -0
  151. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/cli.py +0 -0
  152. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/commands/__init__.py +0 -0
  153. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/commands/build.py +0 -0
  154. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/commands/clean.py +0 -0
  155. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/commands/package.py +0 -0
  156. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/commands/run.py +0 -0
  157. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/config.py +0 -0
  158. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/console.py +0 -0
  159. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/exceptions.py +0 -0
  160. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/packaging/__init__.py +0 -0
  161. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/packaging/builtin.py +0 -0
  162. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/packaging/entry.py +0 -0
  163. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/packaging/icon.py +0 -0
  164. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/packaging/installer.py +0 -0
  165. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/packaging/loader.py +0 -0
  166. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/packaging/net.py +0 -0
  167. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/packaging/runtime.py +0 -0
  168. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/packaging/wheels.py +0 -0
  169. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/platform.py +0 -0
  170. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/progress.py +0 -0
  171. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/py.typed +0 -0
  172. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/slim/base.py +0 -0
  173. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/slim/default.py +0 -0
  174. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/slim/libs.py +0 -0
  175. {fspack-0.2.2 → fspack-0.2.4}/src/fspack/slim/qt.py +0 -0
  176. {fspack-0.2.2 → fspack-0.2.4}/templates/pack-check.yml +0 -0
  177. {fspack-0.2.2 → fspack-0.2.4}/templates/release-pack.yml +0 -0
  178. {fspack-0.2.2 → fspack-0.2.4}/tests/__init__.py +0 -0
  179. {fspack-0.2.2 → fspack-0.2.4}/tests/test_analyzer.py +0 -0
  180. {fspack-0.2.2 → fspack-0.2.4}/tests/test_builder.py +0 -0
  181. {fspack-0.2.2 → fspack-0.2.4}/tests/test_builtin.py +0 -0
  182. {fspack-0.2.2 → fspack-0.2.4}/tests/test_cli.py +0 -0
  183. {fspack-0.2.2 → fspack-0.2.4}/tests/test_commands.py +0 -0
  184. {fspack-0.2.2 → fspack-0.2.4}/tests/test_config.py +0 -0
  185. {fspack-0.2.2 → fspack-0.2.4}/tests/test_console.py +0 -0
  186. {fspack-0.2.2 → fspack-0.2.4}/tests/test_e2e_slow.py +0 -0
  187. {fspack-0.2.2 → fspack-0.2.4}/tests/test_entry.py +0 -0
  188. {fspack-0.2.2 → fspack-0.2.4}/tests/test_fspack.py +0 -0
  189. {fspack-0.2.2 → fspack-0.2.4}/tests/test_icon.py +0 -0
  190. {fspack-0.2.2 → fspack-0.2.4}/tests/test_installer.py +0 -0
  191. {fspack-0.2.2 → fspack-0.2.4}/tests/test_linux_installer.py +0 -0
  192. {fspack-0.2.2 → fspack-0.2.4}/tests/test_loader.py +0 -0
  193. {fspack-0.2.2 → fspack-0.2.4}/tests/test_net.py +0 -0
  194. {fspack-0.2.2 → fspack-0.2.4}/tests/test_platform.py +0 -0
  195. {fspack-0.2.2 → fspack-0.2.4}/tests/test_progress.py +0 -0
  196. {fspack-0.2.2 → fspack-0.2.4}/tests/test_runtime.py +0 -0
  197. {fspack-0.2.2 → fspack-0.2.4}/tests/test_slim.py +0 -0
  198. {fspack-0.2.2 → fspack-0.2.4}/tests/test_wheels.py +0 -0
  199. {fspack-0.2.2 → fspack-0.2.4}/tox.ini +0 -0
  200. {fspack-0.2.2 → fspack-0.2.4}/uv.toml +0 -0
@@ -1,5 +1,5 @@
1
1
  [tool.bumpversion]
2
- current_version = "0.2.2"
2
+ current_version = "0.2.4"
3
3
  commit = true
4
4
  exclude = ["template/*"]
5
5
  message = "chore: 更新版本 {current_version} → {new_version}"
@@ -0,0 +1,232 @@
1
+ name: Release
2
+
3
+ # 触发:push v*.*.* tag
4
+ #
5
+ # 三个并行 job:
6
+ # - pypi : uv build → uv publish(OIDC)→ 上传 sdist/wheel artifact
7
+ # - pack-windows: windows-latest 原生打包 fspack 自身(mingw + NSIS)
8
+ # - pack-linux : ubuntu-latest 原生打包 fspack 自身(gcc + dpkg-dev)
9
+ #
10
+ # release job 依赖以上三个 job,收集构建产物(exe/deb/tar.gz/zip)+
11
+ # PyPI 产物(whl/sdist),统一上传到 GitHub Release。
12
+ # 任一前置 job 失败时 release 仍尝试发布已成功产物,但最终标记 workflow 失败。
13
+
14
+ on:
15
+ push:
16
+ tags: ['v*.*.*']
17
+
18
+ permissions:
19
+ contents: write
20
+ id-token: write
21
+
22
+ concurrency:
23
+ group: release-${{ github.ref }}
24
+ cancel-in-progress: false
25
+
26
+ jobs:
27
+ # ===== PyPI 发布 =====
28
+ pypi:
29
+ name: Build & Publish PyPI
30
+ runs-on: ubuntu-latest
31
+ environment: pypi
32
+ timeout-minutes: 10
33
+ steps:
34
+ - uses: actions/checkout@v5
35
+
36
+ - name: Install uv
37
+ uses: astral-sh/setup-uv@v8.3.2
38
+ with:
39
+ enable-cache: true
40
+ cache-dependency-glob: "uv.lock"
41
+
42
+ - name: Build distributions
43
+ run: uv build
44
+
45
+ - name: Publish to PyPI (OIDC)
46
+ run: uv publish
47
+
48
+ - name: Upload sdist & wheel artifacts
49
+ uses: actions/upload-artifact@v4
50
+ with:
51
+ name: pypi-dist
52
+ path: dist/*
53
+ retention-days: 7
54
+ if-no-files-found: error
55
+
56
+ # ===== Windows 原生打包(用 fspack 打包 fspack 自身)=====
57
+ pack-windows:
58
+ name: Pack (Windows native)
59
+ runs-on: windows-latest
60
+ timeout-minutes: 25
61
+ steps:
62
+ - uses: actions/checkout@v5
63
+
64
+ - name: Install uv
65
+ uses: astral-sh/setup-uv@v8.3.2
66
+ with:
67
+ enable-cache: true
68
+ cache-dependency-glob: "uv.lock"
69
+
70
+ # windows-2025 镜像移除了 NSIS;mingw-w64 提供 x86_64-w64-mingw32-gcc 前缀的交叉编译器
71
+ - name: Install NSIS & mingw-w64
72
+ run: |
73
+ choco install nsis mingw -y --no-progress
74
+ echo "C:\Program Files (x86)\NSIS" >> $GITHUB_PATH
75
+ echo "C:\Program Files\mingw-w64\mingw64\bin" >> $GITHUB_PATH
76
+
77
+ - name: Sync dependencies
78
+ run: uv sync --frozen
79
+
80
+ # fspack 的 download_wheels 用 `pip download` 拉 wheel,但 uv 管理的 venv 默认不含 pip,
81
+ # 且 CI runner 上 PATH 中可能没有带 pip 的系统 python,故显式安装 pip 到 venv。
82
+ - name: Install pip
83
+ run: uv pip install pip
84
+
85
+ - name: Cache fspack assets
86
+ uses: actions/cache@v4
87
+ with:
88
+ path: ~/.fspack/cache/
89
+ key: fspack-windows-${{ hashFiles('pyproject.toml') }}
90
+ restore-keys: |
91
+ fspack-windows-
92
+ fspack-
93
+
94
+ - name: Build fspack with fspack
95
+ run: uv run fspack b . --target windows
96
+
97
+ - name: Generate installer
98
+ run: uv run fspack p . --target windows --format all --no-build
99
+
100
+ - name: Smoke test (version)
101
+ run: ./dist/fspack.exe -V
102
+
103
+ - name: Assert artifacts
104
+ shell: bash
105
+ run: |
106
+ test -f dist/release/fspack-*-windows-*-setup.exe
107
+ test -f dist/release/fspack-*-windows-*.zip
108
+
109
+ - name: Upload failure artifacts
110
+ if: failure()
111
+ uses: actions/upload-artifact@v4
112
+ with:
113
+ name: pack-windows-failure
114
+ path: dist/
115
+ retention-days: 3
116
+
117
+ - name: Upload release artifacts
118
+ if: success()
119
+ uses: actions/upload-artifact@v4
120
+ with:
121
+ name: release-windows
122
+ path: dist/release/
123
+ retention-days: 7
124
+ if-no-files-found: error
125
+
126
+ # ===== Linux 原生打包(用 fspack 打包 fspack 自身)=====
127
+ pack-linux:
128
+ name: Pack (Linux native)
129
+ runs-on: ubuntu-latest
130
+ timeout-minutes: 20
131
+ steps:
132
+ - uses: actions/checkout@v5
133
+
134
+ - name: Install uv
135
+ uses: astral-sh/setup-uv@v8.3.2
136
+ with:
137
+ enable-cache: true
138
+ cache-dependency-glob: "uv.lock"
139
+
140
+ - name: Install toolchain
141
+ run: |
142
+ sudo apt-get update
143
+ sudo apt-get install -y gcc dpkg-dev
144
+
145
+ - name: Sync dependencies
146
+ run: uv sync --frozen
147
+
148
+ # fspack 的 download_wheels 用 `pip download` 拉 wheel,但 uv 管理的 venv 默认不含 pip,
149
+ # 且 CI runner 上 PATH 中可能没有带 pip 的系统 python,故显式安装 pip 到 venv。
150
+ - name: Install pip
151
+ run: uv pip install pip
152
+
153
+ - name: Cache fspack assets
154
+ uses: actions/cache@v4
155
+ with:
156
+ path: ~/.fspack/cache/
157
+ key: fspack-linux-${{ hashFiles('pyproject.toml') }}
158
+ restore-keys: |
159
+ fspack-linux-
160
+ fspack-
161
+
162
+ - name: Build fspack with fspack
163
+ run: uv run fspack b . --target linux
164
+
165
+ - name: Generate installer
166
+ run: uv run fspack p . --target linux --format all --no-build
167
+
168
+ - name: Smoke test (version)
169
+ run: ./dist/fspack -V
170
+
171
+ - name: Assert artifacts
172
+ run: |
173
+ test -f dist/release/fspack-*-linux-*.tar.gz
174
+ test -f dist/release/fspack_*-slim_amd64.deb
175
+ test -f dist/release/fspack-*-linux-*.zip
176
+
177
+ - name: Upload failure artifacts
178
+ if: failure()
179
+ uses: actions/upload-artifact@v4
180
+ with:
181
+ name: pack-linux-failure
182
+ path: dist/
183
+ retention-days: 3
184
+
185
+ - name: Upload release artifacts
186
+ if: success()
187
+ uses: actions/upload-artifact@v4
188
+ with:
189
+ name: release-linux
190
+ path: dist/release/
191
+ retention-days: 7
192
+ if-no-files-found: error
193
+
194
+ # ===== 收集产物并上传到 GitHub Release =====
195
+ release:
196
+ name: Upload to GitHub Release
197
+ needs: [pypi, pack-windows, pack-linux]
198
+ runs-on: ubuntu-latest
199
+ if: always() && !cancelled()
200
+ steps:
201
+ - name: Download all artifacts
202
+ uses: actions/download-artifact@v4
203
+ with:
204
+ path: release-assets/
205
+
206
+ - name: Collect release files
207
+ run: |
208
+ mkdir -p release-files/
209
+ # 构建产物(exe/deb/tar.gz/zip)+ PyPI 产物(whl/sdist)
210
+ # sdist 也是 .tar.gz,但命名 fspack-<version>.tar.gz 不与 Linux 便携包冲突
211
+ find release-assets/ -type f \
212
+ \( -name "*.exe" -o -name "*.deb" -o -name "*.tar.gz" -o -name "*.zip" -o -name "*.whl" \) \
213
+ -exec cp {} release-files/ \;
214
+ echo "::group::Release files"
215
+ ls -la release-files/
216
+ echo "::endgroup::"
217
+
218
+ - name: Create GitHub Release & Upload
219
+ env:
220
+ GH_TOKEN: ${{ github.token }}
221
+ TAG_NAME: ${{ github.ref_name }}
222
+ run: |
223
+ gh release create "$TAG_NAME" \
224
+ --title "Release $TAG_NAME" \
225
+ --generate-notes \
226
+ release-files/*
227
+
228
+ - name: Report failure (if any upstream job failed)
229
+ if: contains(needs.pypi.result, 'failure') || contains(needs.pack-windows.result, 'failure') || contains(needs.pack-linux.result, 'failure')
230
+ run: |
231
+ echo "::error::部分 job 失败(pypi=${{ needs.pypi.result }} windows=${{ needs.pack-windows.result }} linux=${{ needs.pack-linux.result }}),已成功的产物已上传到 Release。"
232
+ exit 1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fspack
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: 极速 Python 项目打包器。
5
5
  Author-email: gooker_young <gooker_young@qq.com>
6
6
  License-Expression: MIT
@@ -258,6 +258,19 @@ fspack 可集成到其他 Python 项目的 CI/CD 工作流,实现自动打包
258
258
  - [`templates/pack-check.yml`](templates/pack-check.yml) — PR 验证打包(push/PR 触发,验证打包不破坏)
259
259
  - [`templates/release-pack.yml`](templates/release-pack.yml) — Release 发布安装包(tag 触发,矩阵打包 Windows + Linux 安装包附到 GitHub Release)
260
260
 
261
+ ### fspack 自身的发布流程
262
+
263
+ fspack 自身通过 [.github/workflows/release.yml](.github/workflows/release.yml) 在 `git push v*.*.*` 时用**各平台原生 runner 打包自身**发布到 GitHub Release:
264
+
265
+ | job | runner | 产物 |
266
+ |-----|--------|------|
267
+ | `pypi` | ubuntu-latest | sdist + wheel(uv build → uv publish)|
268
+ | `pack-windows` | windows-latest | NSIS 安装包 `.exe` + 跨平台便携包 `.zip` |
269
+ | `pack-linux` | ubuntu-latest | tar.gz 便携包 + `.deb` 安装包 + 跨平台便携包 `.zip` |
270
+ | `release` | ubuntu-latest | 收集以上产物统一上传到 GitHub Release |
271
+
272
+ 原生平台打包使 pyc 预编译生效、loader 用本机 gcc/mingw 原生编译,避免交叉编译的 wine 不稳定。任一 job 失败时 `release` 仍尝试发布已成功产物,但最终标记 workflow 失败。
273
+
261
274
  ### 快速上手
262
275
 
263
276
  1. 复制模板到你的项目:
@@ -210,6 +210,19 @@ fspack 可集成到其他 Python 项目的 CI/CD 工作流,实现自动打包
210
210
  - [`templates/pack-check.yml`](templates/pack-check.yml) — PR 验证打包(push/PR 触发,验证打包不破坏)
211
211
  - [`templates/release-pack.yml`](templates/release-pack.yml) — Release 发布安装包(tag 触发,矩阵打包 Windows + Linux 安装包附到 GitHub Release)
212
212
 
213
+ ### fspack 自身的发布流程
214
+
215
+ fspack 自身通过 [.github/workflows/release.yml](.github/workflows/release.yml) 在 `git push v*.*.*` 时用**各平台原生 runner 打包自身**发布到 GitHub Release:
216
+
217
+ | job | runner | 产物 |
218
+ |-----|--------|------|
219
+ | `pypi` | ubuntu-latest | sdist + wheel(uv build → uv publish)|
220
+ | `pack-windows` | windows-latest | NSIS 安装包 `.exe` + 跨平台便携包 `.zip` |
221
+ | `pack-linux` | ubuntu-latest | tar.gz 便携包 + `.deb` 安装包 + 跨平台便携包 `.zip` |
222
+ | `release` | ubuntu-latest | 收集以上产物统一上传到 GitHub Release |
223
+
224
+ 原生平台打包使 pyc 预编译生效、loader 用本机 gcc/mingw 原生编译,避免交叉编译的 wine 不稳定。任一 job 失败时 `release` 仍尝试发布已成功产物,但最终标记 workflow 失败。
225
+
213
226
  ### 快速上手
214
227
 
215
228
  1. 复制模板到你的项目:
@@ -3,6 +3,33 @@
3
3
  fspack 可集成到其他 Python 项目的 CI/CD 工作流,实现自动打包与打包成功验证。
4
4
  本文介绍三种集成模式、测试反馈机制,并提供可复用的 GitHub Actions workflow 模板。
5
5
 
6
+ ## fspack 自身的发布流程
7
+
8
+ fspack 自身通过 [.github/workflows/release.yml](https://github.com/gookeryoung/fspack/blob/main/.github/workflows/release.yml)
9
+ 在 `git push v*.*.*` tag 时,用**各平台原生 runner 打包自身**发布到 GitHub Release:
10
+
11
+ | job | runner | 工具链 | 产物 |
12
+ |-----|--------|--------|------|
13
+ | `pypi` | ubuntu-latest | uv | sdist + wheel(PyPI 发布) |
14
+ | `pack-windows` | windows-latest | mingw-w64 + NSIS | NSIS 安装包 `.exe` + 跨平台便携包 `.zip` |
15
+ | `pack-linux` | ubuntu-latest | gcc + dpkg-dev | tar.gz 便携包 + `.deb` 安装包 + 跨平台便携包 `.zip` |
16
+ | `release` | ubuntu-latest | gh | 收集以上所有产物统一上传到 GitHub Release |
17
+
18
+ **原生平台打包**而非 ubuntu 交叉编译的原因:
19
+
20
+ - pyc 预编译仅在 `target is detect_platform()` 时执行(避免跨版本字节码不兼容)
21
+ - loader 用本机 gcc/mingw 原生编译,无需 wine 兼容层
22
+ - Windows Server 2025 runner 已移除 NSIS 预装,workflow 中显式 `choco install nsis mingw`
23
+
24
+ 任一前置 job 失败时 `release` job 仍尝试发布已成功产物(`if: always() && !cancelled()`),
25
+ 但最终通过 `Report failure` 步骤标记 workflow 失败,便于追踪问题。
26
+
27
+ **工具链安装要点**:
28
+
29
+ - Windows runner:`choco install nsis mingw -y` 安装 NSIS 与带 `x86_64-w64-mingw32-gcc` 前缀的 mingw-w64,
30
+ 并将路径追加到 `$GITHUB_PATH`
31
+ - Linux runner:`apt-get install -y gcc dpkg-dev`,gcc 与 dpkg-deb 均为标准包
32
+
6
33
  ## 集成架构
7
34
 
8
35
  ```text
@@ -22,7 +22,7 @@ license = "MIT"
22
22
  name = "fspack"
23
23
  readme = "README.md"
24
24
  requires-python = ">=3.8"
25
- version = "0.2.2"
25
+ version = "0.2.4"
26
26
 
27
27
  [project.optional-dependencies]
28
28
  dev = [
@@ -23,4 +23,4 @@ except (ImportError, AttributeError): # pragma: no cover
23
23
 
24
24
  __all__ = ["__version__"]
25
25
 
26
- __version__ = "0.2.2"
26
+ __version__ = "0.2.4"
@@ -24,14 +24,10 @@
24
24
  - :func:`classify_entry`:分类 wheel 条目归属
25
25
  - :class:`SlimSpec`:精简规则抽象基类
26
26
  - :func:`register_spec`/``get_spec``:注册表接口
27
-
28
- ``zipfile`` 暴露在模块命名空间供外部 monkeypatch 使用。
29
27
  """
30
28
 
31
29
  from __future__ import annotations
32
30
 
33
- import zipfile # noqa: F401 暴露在 fspack.slim 命名空间,供外部 monkeypatch 使用
34
-
35
31
  from fspack.slim.base import (
36
32
  SlimSpec,
37
33
  classify_entry,
@@ -656,7 +656,7 @@ wheels = [
656
656
 
657
657
  [[package]]
658
658
  name = "fspack"
659
- version = "0.2.1"
659
+ version = "0.2.3"
660
660
  source = { editable = "." }
661
661
  dependencies = [
662
662
  { name = "rich", version = "14.3.4", source = { registry = "https://mirrors.aliyun.com/pypi/simple/" }, marker = "python_full_version < '3.9'" },
@@ -1,44 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- tags: ['v*.*.*']
6
-
7
- permissions:
8
- contents: write
9
- id-token: write
10
-
11
- concurrency:
12
- group: release-${{ github.ref }}
13
- cancel-in-progress: false
14
-
15
- jobs:
16
- release:
17
- name: Build & Publish
18
- runs-on: ubuntu-latest
19
- environment: pypi
20
- timeout-minutes: 10
21
- steps:
22
- - uses: actions/checkout@v5
23
-
24
- - name: Install uv
25
- uses: astral-sh/setup-uv@v8.3.2
26
- with:
27
- enable-cache: true
28
- cache-dependency-glob: "uv.lock"
29
-
30
- - name: Build distributions
31
- run: uv build
32
-
33
- - name: Publish to PyPI (OIDC)
34
- run: uv publish
35
-
36
- - name: Create GitHub Release
37
- env:
38
- GH_TOKEN: ${{ github.token }}
39
- TAG_NAME: ${{ github.ref_name }}
40
- run: |
41
- gh release create "$TAG_NAME" \
42
- --title "Release $TAG_NAME" \
43
- --generate-notes \
44
- dist/*
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes