Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Use uv as Python SDK build backend (#27901)

Charlie Marsh94427aaf46fa
diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml
index f3bc3a71f2..44bdf00c11 100644
--- a/sdk/python/pyproject.toml
+++ b/sdk/python/pyproject.toml
@@ -1,6 +1,6 @@
[build-system]
-requires = ["hatchling>=1.27.0"]
-build-backend = "hatchling.build"
+requires = ["uv_build>=0.11.19,<0.12"]
+build-backend = "uv_build"
[project]
name = "openai-codex"
@@ -36,28 +36,6 @@ dev = [
{ include-group = "format" },
]
-[tool.hatch.build]
-exclude = [
- ".venv/**",
- ".venv2/**",
- ".pytest_cache/**",
- "dist/**",
- "build/**",
-]
-
-[tool.hatch.build.targets.wheel]
-packages = ["src/openai_codex"]
-include = [
- "src/openai_codex/py.typed",
-]
-
-[tool.hatch.build.targets.sdist]
-include = [
- "src/openai_codex/**",
- "README.md",
- "pyproject.toml",
-]
-
[tool.pytest.ini_options]
addopts = "-q"
testpaths = ["tests"]
diff --git a/sdk/python/tests/test_artifact_workflow_and_binaries.py b/sdk/python/tests/test_artifact_workflow_and_binaries.py
index 7bedc0cc6f..340d016ecb 100644
--- a/sdk/python/tests/test_artifact_workflow_and_binaries.py
+++ b/sdk/python/tests/test_artifact_workflow_and_binaries.py
@@ -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,
}