Stage publishable Python runtime wheels#18865
Conversation
There was a problem hiding this comment.
💡 Codex Review
https://github.com/openai/codex/blob/9f9f78633876b80dac9dca3fe8b15b565f4c3929/sdk/python/scripts/update_sdk_artifacts.py#L182
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".
9f9f786 to
80217a2
Compare
| from pathlib import Path | ||
|
|
||
| PACKAGE_NAME = "codex-cli-bin" | ||
| PACKAGE_NAME = "openai-codex-cli-bin" |
There was a problem hiding this comment.
| help="Pinned openai-codex-cli-bin version for the staged SDK package", |
8f71bf1 to
79cdb26
Compare
79cdb26 to
5522586
Compare
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
openai-codex-cli-binwhile keeping the import package ascodex_cli_bin.py3-none-<platform>wheels instead of interpreter-specific wheels.stage-runtime --codex-versionand--platform-tagso release staging can produce the platform wheel matrix from Codex release tags.Why Rename
There is already an unofficial PyPI package,
codex-bin, distributing OpenAI Codex binaries. Publishing the official SDK runtime dependency asopenai-codex-cli-binmakes the ownership clear, avoids confusing the SDK-pinned runtime wheel with that unowned wrapper, and keeps the import package unchanged ascodex_cli_bin.Tests
uv run --extra dev pytest tests/test_artifact_workflow_and_binaries.py-> 21 passeduv 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_arm64uv run --with build --extra dev python -m build --wheel /tmp/codex-python-pr2-rebased/runtime-stageuv 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.whlNote
uv run --extra dev pytestcurrently fails because regenerating from schemas already onmainadds new DeviceKey Python types. I left that generated catch-up out of this runtime-only PR.