Skip to content

feat: build standalone CLI binaries with PyInstaller + clean-room smoketest#318

Draft
BartoszBlizniak wants to merge 4 commits into
eng-12825-migrate-cli-packaging-to-uv-pyprojecttomlfrom
eng-12826-build-standalone-cli-binaries-with-pyinstaller-clean-room
Draft

feat: build standalone CLI binaries with PyInstaller + clean-room smoketest#318
BartoszBlizniak wants to merge 4 commits into
eng-12825-migrate-cli-packaging-to-uv-pyprojecttomlfrom
eng-12826-build-standalone-cli-binaries-with-pyinstaller-clean-room

Conversation

@BartoszBlizniak

@BartoszBlizniak BartoszBlizniak commented Jun 17, 2026

Copy link
Copy Markdown
Member

Description

Adds standalone, no-Python-required CLI binaries built with PyInstaller, plus a clean-room smoketest workflow that builds and tests them across all target platforms.

What this PR adds:

  • packaging/pyinstaller/cloudsmith.spec + entry.py — PyInstaller onedir build (faster cold start than onefile; distributed as tar.gz / zip). entry.py adds a frozen self-import sweep (CLOUDSMITH_SELFTEST) and UTF-8 stdout/stderr handling for legacy Windows consoles.
  • packaging/constraints.txt — pinned, locked constraint set (exported from uv.lock, --group binary --extra all) used to install the build environment reproducibly. The binaries workflow verifies it matches the lockfile.
  • packaging/smoketest.sh — offline + online (read-only) smoketests: import sweep, --version, per-command --help sweep, keyring/auth path, AWS OIDC dep load, credential-helper docker offline + frozen-launcher self-reference, frozen mcp configure, and online whoami / list repos / mcp list_tools / check service.
  • .github/workflows/binaries.yml — two-stage build → clean-room test matrix for linux-{x86_64,aarch64}-{gnu,musl}, macos-{arm64,x86_64}, windows-x86_64. Builds in glibc (almalinux:8, glibc floor enforced <= 2.28) / musl (alpine) containers and native mac/Windows; tests download the artifact and run on clean runners that assert no Python is present. Includes a GitHub-OIDC online auth job.
  • Code: mcp.py _get_server_config and credential_helpers/docker/installer.py now detect a frozen (sys.frozen) binary and point the MCP/credential-helper launchers at the absolute sys.executable instead of a bare cloudsmith on PATH. Tests updated accordingly.
  • .github/workflows/zizmor.yml, .typos.toml — lint coverage for the new workflow.

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Documentation update
  • Refactoring
  • Other (please describe)

Additional Notes

Stacks on eng-12825 (uv + pyproject.toml packaging migration). Base: eng-12825-migrate-cli-packaging-to-uv-pyprojecttoml at tip 2e9e498 .

BartoszBlizniak and others added 4 commits June 17, 2026 17:26
…ketest

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop the linux-x86_64-gnu-only narrowing on PR events so every push
exercises the full build + clean-room test matrix across all targets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant