chore: vendor sglang v0.5.10 snapshot
This commit is contained in:
28
third_party/sglang/sgl-model-gateway/bindings/python/setup.py
vendored
Normal file
28
third_party/sglang/sgl-model-gateway/bindings/python/setup.py
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import os
|
||||
import warnings
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
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 with_rust:
|
||||
from setuptools_rust import Binding, RustExtension
|
||||
|
||||
rust_extensions.append(
|
||||
RustExtension(
|
||||
target="sglang_router_rs",
|
||||
path="Cargo.toml",
|
||||
binding=Binding.PyO3,
|
||||
)
|
||||
)
|
||||
else:
|
||||
warnings.warn(
|
||||
"Building 'sglang-router' without Rust support. Performance may be degraded."
|
||||
)
|
||||
|
||||
setup(
|
||||
rust_extensions=rust_extensions,
|
||||
zip_safe=False,
|
||||
)
|
||||
Reference in New Issue
Block a user