build: bundle native TUI in platform wheels
This commit is contained in:
1 parent
9fda51ec6b
commit
d8efb852da
8 files changed
+431
-16
No files matched your search
+35
-6
@@ -18,7 +18,7 @@ uploading to PyPI, and deploying the documentation are separate operations.
|
||||
5. Build in a clean output directory with `uv build --out-dir <artifact-directory>`.
|
||||
Do not set `NANOBOT_SKIP_WEBUI_BUILD`. The build hook bundles the WebUI in the sdist and
|
||||
wheel; the wheel is built from the sdist.
|
||||
6. Check the two distributions with `twine check`, inspect their contents, and record SHA-256
|
||||
6. Check the intermediate distributions with `twine check`, inspect their contents, and record SHA-256
|
||||
hashes. Test installation in an isolated environment outside the source checkout, then
|
||||
test upgrading from the previous stable version using disposable configuration and sessions.
|
||||
Do not use a maintainer's live workspace for migration tests.
|
||||
@@ -36,6 +36,10 @@ uploading to PyPI, and deploying the documentation are separate operations.
|
||||
manifest, executable architecture, required notices/licenses, and embedded source contents.
|
||||
Run platform-specific smoke tests where supported; record cross-compiled-only targets as
|
||||
such and link exact-head CI evidence instead of claiming native execution everywhere.
|
||||
Bundle these archives into the five platform wheels using the command below. Check all final
|
||||
wheels with `twine check`, validate their RECORDs, tags and installed executable permissions,
|
||||
and test first launch with an empty cache and `NANOBOT_TUI_NO_DOWNLOAD=1`. The installed
|
||||
executable must come from `site-packages/nanobot/tui/bin/`, not the checkout or a cache.
|
||||
10. Merge the release-preparation PR only after its current checks and reviews pass. Confirm the
|
||||
merged source tree matches the tested candidate; if it does not, rebuild and recheck before
|
||||
tagging. Reconcile the final changelog and documentation source references. The tag must
|
||||
@@ -60,9 +64,33 @@ python3 scripts/package-release.py <target>
|
||||
Repeat for `darwin-arm64`, `darwin-x64`, `linux-arm64`, `linux-x64`, and `win32-x64`.
|
||||
On macOS, use `codesign --force --sign - <binary>` and verify the signature. The publication
|
||||
workflow uses pinned `rcodesign` on Linux. Keep the ten `.zip`/`.zip.sha256` outputs in a
|
||||
candidate-specific directory, alongside the two Python distributions and provenance manifest.
|
||||
candidate-specific directory, alongside the Python build intermediates and provenance manifest.
|
||||
Do not include local configuration, instance backups, or test environments in upload selections.
|
||||
|
||||
### Build the PyPI platform wheels
|
||||
|
||||
From the exact release checkout, after `uv build` and the native archive checks:
|
||||
|
||||
```bash
|
||||
uv run python -m scripts.build_tui_wheels \
|
||||
--wheel <intermediates>/nanobot_ai-X.Y.Z-py3-none-any.whl \
|
||||
--tui-dir <verified-tui-archives> \
|
||||
--out-dir <final-wheels>
|
||||
```
|
||||
|
||||
The script verifies the Python version and RECORD, native checksums, architecture, notices and
|
||||
embedded source against the checkout, then writes five wheels with complete TUI bundles and
|
||||
regenerated RECORDs. It refuses to overwrite an existing candidate. `--target <target>` builds
|
||||
one platform for a targeted check. Minimum tags are macOS 13, manylinux glibc 2.17 and Windows
|
||||
x64; x64 builds use Bun's baseline (SSE4.2) runtime instead of requiring AVX2. Recheck both Bun
|
||||
and OpenTUI when upgrading either dependency. No musl or Windows ARM64
|
||||
wheel is provided. Native execution checks must still validate the actual binaries; tags alone
|
||||
do not prove compatibility. Test pip selection for all five supported platforms.
|
||||
|
||||
The final PyPI upload set is **five platform wheels plus one source distribution**. Do not upload
|
||||
the intermediate `py3-none-any.whl` or native ZIPs to PyPI. Keep the source distribution produced
|
||||
by the same build; it remains usable for Python/classic and WebUI installations on other platforms.
|
||||
|
||||
Keep an artifact manifest with the source commit, version, filenames, hashes, checks performed,
|
||||
and any remaining release gates. Rebuild and recheck if the packaged source changes.
|
||||
|
||||
@@ -79,11 +107,12 @@ and any remaining release gates. Rebuild and recheck if the packaged source chan
|
||||
already completed compliance review. Wait for all five targets and repeat artifact checks
|
||||
on those new outputs. Do not substitute their new bytes under the old artifact hashes.
|
||||
5. Make the GitHub Release and all TUI attachments publicly available. Verify their public
|
||||
downloads before publishing Python, since installed clients fetch version-matched assets.
|
||||
6. Upload only the checked `nanobot_ai-X.Y.Z.tar.gz` and `nanobot_ai-X.Y.Z-py3-none-any.whl`
|
||||
to PyPI. Do not upload stale files from a shared `dist/` directory. This repository has no
|
||||
downloads for fallback/source-built installations. Supported platform-wheel installs do not
|
||||
need these downloads to start the TUI.
|
||||
6. Upload only the checked `nanobot_ai-X.Y.Z.tar.gz` and the five final platform wheels
|
||||
to PyPI. Do not upload the intermediate universal wheel or stale files from a shared `dist/` directory. This repository has no
|
||||
automatic PyPI publication workflow.
|
||||
7. Verify installation from PyPI, bundled WebUI startup, and the matching TUI download in
|
||||
7. Verify installation from PyPI, bundled WebUI startup, and bundled TUI startup without downloads in
|
||||
clean environments. Merge the prepared wiki PR only when the stable package is available:
|
||||
merging its `main` deploys the site automatically. Confirm all localized `/docs/latest/`
|
||||
routes select the new version and old version links still work.
|
||||
|
||||
Reference in new issue
Block a user