[misc] Rename minilb install env & remove files & fix lint (#13831)

This commit is contained in:
Liangsheng Yin
2025-11-24 13:50:00 +08:00
committed by GitHub
parent 414248e0d0
commit 981ca8313f
3 changed files with 15 additions and 15 deletions

View File

@@ -1,11 +1,13 @@
import os
import warnings
from setuptools import setup
no_rust = os.environ.get("SGLANG_ROUTER_BUILD_NO_RUST") == "1"
with_rust = os.environ.get("SGLANG_ROUTER_BUILD_WITH_RUST", None)
with_rust = with_rust is None or (not with_rust.lower() in ["0", "false", "no"])
rust_extensions = []
if not no_rust:
if with_rust:
from setuptools_rust import Binding, RustExtension
rust_extensions.append(
@@ -15,6 +17,10 @@ if not no_rust:
binding=Binding.PyO3,
)
)
else:
warnings.warn(
"Building 'sglang-router' without Rust support. Performance may be degraded."
)
setup(
rust_extensions=rust_extensions,