Skip to content

Stage publishable Python runtime wheels#18865

Merged
sdcoffey merged 3 commits into
mainfrom
dev/steve/python-runtime-pypi-wheel
Apr 22, 2026
Merged

Stage publishable Python runtime wheels#18865
sdcoffey merged 3 commits into
mainfrom
dev/steve/python-runtime-pypi-wheel

Conversation

@sdcoffey

@sdcoffey sdcoffey commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

This is PR 2 of the Python SDK PyPI publishing split. PR 1 refreshed the generated SDK bindings; this PR makes the runtime package itself publishable, and PR 3 will wire the SDK package/version pinning to this runtime package.

Summary

  • Rename the runtime distribution to openai-codex-cli-bin while keeping the import package as codex_cli_bin.
  • Make the runtime package wheel-only and build py3-none-<platform> wheels instead of interpreter-specific wheels.
  • Add stage-runtime --codex-version and --platform-tag so release staging can produce the platform wheel matrix from Codex release tags.
  • Add focused artifact workflow tests for version normalization, platform tag injection, and runtime wheel metadata.

Why Rename

There is already an unofficial PyPI package, codex-bin, distributing OpenAI Codex binaries. Publishing the official SDK runtime dependency as openai-codex-cli-bin makes the ownership clear, avoids confusing the SDK-pinned runtime wheel with that unowned wrapper, and keeps the import package unchanged as codex_cli_bin.

Tests

  • uv run --extra dev pytest tests/test_artifact_workflow_and_binaries.py -> 21 passed
  • uv run --extra dev python scripts/update_sdk_artifacts.py stage-runtime /tmp/codex-python-pr2-rebased/runtime-stage /tmp/codex-python-pr2-rebased/codex --codex-version rust-v0.116.0-alpha.1 --platform-tag macosx_11_0_arm64
  • uv run --with build --extra dev python -m build --wheel /tmp/codex-python-pr2-rebased/runtime-stage
  • uv run --with twine --extra dev twine check /tmp/codex-python-pr2-rebased/runtime-stage/dist/openai_codex_cli_bin-0.116.0a1-py3-none-macosx_11_0_arm64.whl

Note

  • Full uv run --extra dev pytest currently fails because regenerating from schemas already on main adds new DeviceKey Python types. I left that generated catch-up out of this runtime-only PR.

@sdcoffey sdcoffey marked this pull request as ready for review April 21, 2026 18:15

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

https://github.com/openai/codex/blob/9f9f78633876b80dac9dca3fe8b15b565f4c3929/sdk/python/scripts/update_sdk_artifacts.py#L182
P1 Badge Update staged SDK dependency to renamed runtime package

stage-runtime now builds openai-codex-cli-bin, but stage_sdk still injects "codex-cli-bin==...". This leaves staged SDK wheels depending on a different distribution name than the one this commit produces, so installs can fail once only the renamed runtime is published.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sdcoffey sdcoffey force-pushed the dev/steve/python-runtime-pypi-wheel branch from 9f9f786 to 80217a2 Compare April 21, 2026 18:30
from pathlib import Path

PACKAGE_NAME = "codex-cli-bin"
PACKAGE_NAME = "openai-codex-cli-bin"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still see the old codex-cli-bin here and here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
help="Pinned openai-codex-cli-bin version for the staged SDK package",

@sdcoffey sdcoffey force-pushed the dev/steve/python-runtime-pypi-wheel branch from 8f71bf1 to 79cdb26 Compare April 21, 2026 20:22
@sdcoffey sdcoffey force-pushed the dev/steve/python-runtime-pypi-wheel branch from 79cdb26 to 5522586 Compare April 22, 2026 03:15
@sdcoffey sdcoffey merged commit 0127cef into main Apr 22, 2026
25 checks passed
@sdcoffey sdcoffey deleted the dev/steve/python-runtime-pypi-wheel branch April 22, 2026 15:14
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants