setup.py 431 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import os

from setuptools import setup
from setuptools_rust import Binding, RustExtension

no_rust = os.environ.get("SGLANG_ROUTER_BUILD_NO_RUST") == "1"

rust_extensions = []
if not no_rust:
    rust_extensions.append(
        RustExtension(
            target="sglang_router_rs",
            path="Cargo.toml",
            binding=Binding.PyO3,
        )
    )

setup(
    rust_extensions=rust_extensions,
    zip_safe=False,
)