fix(build): restore pure-Python uv_build backend to unblock PyPI publish

#31267 switched the build backend to maturin to bundle the Rust OCR
bridge into the litellm wheel. On the release runner, maturin builds
with `--compatibility off` and emits a `cp312-cp312-linux_x86_64`
wheel. PyPI only accepts `manylinux*` Linux wheels, so the upload is
rejected with `400 Bad Request - unsupported platform tag
'linux_x86_64'`, which blocked the 1.91.0.dev2 publish.

Revert `[build-system]` to the pure-Python `uv_build` backend and
restore `[tool.uv.build-backend]` so the release once again produces a
universal `litellm-<ver>-py3-none-any.whl` that installs on every
OS / arch / Python.

The Rust bridge stays optional: `litellm/rust_bridge/loader.py` already
falls back gracefully when `_native` is absent (`try/except
ImportError`), so runtime behavior is unchanged - the native module is
simply not bundled. Rust acceleration can ship as a separate
platform-specific package later.
This commit is contained in:
Yuneng Jiang 2026-06-26 12:44:07 -07:00
parent e99151bb95
commit 8622df5a63
No known key found for this signature in database

View file

@ -234,24 +234,8 @@ healthcheck = [
]
[build-system]
requires = ["maturin==1.9.4"]
build-backend = "maturin"
[tool.maturin]
manifest-path = "litellm-rust/crates/python-bridge/Cargo.toml"
module-name = "litellm.rust_bridge._native"
python-source = "."
bindings = "pyo3"
exclude = [
"litellm/proxy/enterprise",
"litellm/proxy/enterprise/**",
"**/__pycache__",
"**/__pycache__/**",
"**/.pytest_cache",
"**/.pytest_cache/**",
"**/.ruff_cache",
"**/.ruff_cache/**",
]
requires = ["uv_build==0.11.8"]
build-backend = "uv_build"
[tool.uv]
constraint-dependencies = [
@ -269,6 +253,18 @@ litellm-enterprise = { workspace = true }
[tool.uv.workspace]
members = ["enterprise", "litellm-proxy-extras"]
[tool.uv.build-backend]
module-root = ""
source-exclude = [
"litellm/proxy/enterprise",
"**/__pycache__",
"**/__pycache__/**",
"**/.pytest_cache",
"**/.pytest_cache/**",
"**/.ruff_cache",
"**/.ruff_cache/**",
]
[tool.isort]
profile = "black"