Use uv as Python SDK build backend (#27901)

## 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.
This commit is contained in:
Charlie Marsh
2026-06-12 13:21:00 -04:00
committed by GitHub
Unverified
parent d735ef162f
commit 94427aaf46
2 changed files with 4 additions and 32 deletions
@@ -362,8 +362,8 @@ def test_source_sdk_template_pins_published_runtime() -> None:
}
def test_source_sdk_package_declares_beta_documentation_and_release_files() -> None:
"""Public package metadata should link beta docs and ship package metadata."""
def test_source_sdk_package_declares_beta_documentation() -> None:
"""Public package metadata should link beta docs."""
pyproject = tomllib.loads((ROOT / "pyproject.toml").read_text())
readme = (ROOT / "README.md").read_text()
@@ -372,7 +372,6 @@ def test_source_sdk_package_declares_beta_documentation_and_release_files() -> N
"is_beta": "Development Status :: 4 - Beta" in pyproject["project"]["classifiers"],
"license": pyproject["project"]["license"],
"documentation": pyproject["project"]["urls"]["Documentation"],
"sdist_include": pyproject["tool"]["hatch"]["build"]["targets"]["sdist"]["include"],
"readme_is_beta": "# OpenAI Codex Python SDK (Beta)" in readme,
"local_license_file": (ROOT / "LICENSE").exists(),
} == {
@@ -380,11 +379,6 @@ def test_source_sdk_package_declares_beta_documentation_and_release_files() -> N
"is_beta": True,
"license": "Apache-2.0",
"documentation": "https://github.com/openai/codex/tree/main/sdk/python/docs",
"sdist_include": [
"src/openai_codex/**",
"README.md",
"pyproject.toml",
],
"readme_is_beta": True,
"local_license_file": False,
}