Skip to content

Use uv as Python SDK build backend - #27901

Merged
charliemarsh-oai merged 3 commits into
mainfrom
charlie/python-sdk-uv-build-backend
Jun 12, 2026
Merged

Use uv as Python SDK build backend#27901
charliemarsh-oai merged 3 commits into
mainfrom
charlie/python-sdk-uv-build-backend

Conversation

@charliemarsh-oai

@charliemarsh-oai charliemarsh-oai commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Replace Hatchling with uv's build backend for the Python SDK. The backend infers the src/openai_codex module from the normalized project name and standard source layout, so no uv-specific package configuration is required.

This keeps Python packaging within the uv toolchain already used for dependency management and release builds. A controlled before-and-after PEP 517 comparison produced identical wheel package paths, bytes, permissions, and semantic metadata. The sdist retains the SDK package tree, root README, and project metadata while dropping the unrelated examples README that Hatch included through its broad include matching.

@charliemarsh-oai
charliemarsh-oai marked this pull request as ready for review June 12, 2026 16:24
Comment thread sdk/python/pyproject.toml Outdated
[tool.uv.build-backend]
module-name = "openai_codex"
source-include = [
"examples/README.md",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why do we include this?

Comment thread sdk/python/pyproject.toml Outdated
"README.md",
"pyproject.toml",
[tool.uv.build-backend]
module-name = "openai_codex"

@konsti-openai konsti-openai Jun 12, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

That should be inferred, we don't need to set it.

@charliemarsh-oai
charliemarsh-oai enabled auto-merge (squash) June 12, 2026 17:17
@charliemarsh-oai
charliemarsh-oai merged commit 94427aa into main Jun 12, 2026
31 checks passed
@charliemarsh-oai
charliemarsh-oai deleted the charlie/python-sdk-uv-build-backend branch June 12, 2026 17:21
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 12, 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