mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
build: restore maturin backend to bundle the Rust bridge in the wheel
Re-apply the maturin build backend (reverting #31470, which had temporarily restored the pure-Python uv_build backend). maturin packages the Rust bridge (litellm.rust_bridge._native) into the wheel; the loader already falls back gracefully when the native module is absent, so pure-Python installs are unaffected. The earlier revert was needed because the release pipeline emitted a bare cp312 linux_x86_64 wheel that PyPI rejects. That is resolved on the pipeline side: it now branches on the build backend and, for maturin, builds proper manylinux_2_28 wheels (x86_64 + aarch64) and validates each wheel carries the native module. The [tool.maturin] include for litellm/proxy/_experimental/out/** is sdist coverage for the Admin UI bundle. maturin's include overrides .gitignore for the sdist but not the wheel; the committed bundle stays tracked and un-ignored, so it flows into both the wheel (maturin's source walk) and the sdist as-is. Coordinates with the release pipeline change that builds the Admin UI from source and gates the built wheel/sdist on the bundle being present; that should land first so the pipeline can build and verify a maturin UI wheel.
This commit is contained in:
parent
c737789b26
commit
5211c73017
1 changed files with 19 additions and 14 deletions
|
|
@ -234,8 +234,25 @@ healthcheck = [
|
|||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["uv_build==0.11.8"]
|
||||
build-backend = "uv_build"
|
||||
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"
|
||||
include = ["litellm/proxy/_experimental/out/**"]
|
||||
exclude = [
|
||||
"litellm/proxy/enterprise",
|
||||
"litellm/proxy/enterprise/**",
|
||||
"**/__pycache__",
|
||||
"**/__pycache__/**",
|
||||
"**/.pytest_cache",
|
||||
"**/.pytest_cache/**",
|
||||
"**/.ruff_cache",
|
||||
"**/.ruff_cache/**",
|
||||
]
|
||||
|
||||
[tool.uv]
|
||||
constraint-dependencies = [
|
||||
|
|
@ -258,18 +275,6 @@ 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"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue