Skip to content

refactor(python): render packages with Jinja and stage runtimes in Actions - #70

Merged
zhenghaoz merged 4 commits into
mainfrom
refactor/python-jinja-packaging
Nov 6, 2026
Merged

zhenghaoz merged 4 commits into
mainfrom
refactor/python-jinja-packaging

Conversation

@zhangzhenghao

@zhangzhenghao zhangzhenghao commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Keep scikit-build-core as the direct packaging backend, with CMake disabled and automatic py3-none platform wheel tags. No custom build backend or hook.
  • Add one repository-only Jinja2 python/pyproject.toml.j2 template for CPU, CUDA, ROCm and Vulkan packages; publish only rendered metadata, never templates.
  • Delete stage_runtime.py, _build_backend.py, prepare_backend.py; do not introduce hatch_build.py.
  • GitHub Actions directly copies externally compiled runtime files and licenses, then validates them before wheel assembly.
  • Exclude tests from both wheels and sdists. Release CI obtains tests separately from the exact release checkout, preserving the installed-wheel Python 3.9–3.14 matrix.
  • Update archive/release validators and documentation; preserve the shared native build and existing Node/Rust jobs.

Verification

  • Independent review: no blocking findings.
  • Installed real CPU wheel + packaging/release tests: 109 passed, 77 subtests passed, including real inference, ownership, concurrency and typing.
  • Actual release workflow rendering/source-build blocks exercised: CPU/CUDA/ROCm/Vulkan sdists built and passed strict Twine checks; inspected wheels and sdists contain no tests.
  • Compiler/CMake/Ninja PATH sentinels confirmed compilation-free packaging on Linux.
  • Native payload bytes match the external runtime; NumPy absent.
  • actionlint and git diff --check passed.

Limits

  • GPU namespace packaging checks use CPU runtime bytes and are not GPU execution evidence.
  • No local macOS/Windows runner execution, GPU compilation/inference, manylinux repair, or registry publishing.
  • Removing the custom backend intentionally moves missing/invalid-runtime validation to Actions; standalone direct-backend builds must prepare the documented runtime and license payload themselves.

Template exclusion follow-up

  • Both wheels and sdists exclude all .j2 files; GPU rendering and installed-wheel tests receive the template from the exact checkout, not published archives.
  • Inspected four wheels and four sdists: no templates or tests. Actual workflow sandbox verified; 91 installed-wheel tests, 19 release tests and 7 packaging tests passed. Independent review found no blockers.

Remote CI

  • CI run 42280272477 passed on latest head ffa1e9c5514f094cf16617d137b27a965923e579: all 10 jobs succeeded, including Linux x64/ARM64, macOS ARM64 and Windows x64 Python assembly/tests; Windows ARM64 retains C++-only coverage. Release-only GPU/repair/publication jobs remain unexecuted.

@zhangzhenghao zhangzhenghao changed the title refactor(python): package external runtimes with Hatchling and Jinja refactor(python): render packages with Jinja and stage runtimes in Actions Nov 6, 2026
@zhenghaoz
zhenghaoz merged commit 2991aba into main Nov 6, 2026
10 checks passed
@zhenghaoz
zhenghaoz deleted the refactor/python-jinja-packaging branch November 6, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants