-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
18 lines (15 loc) · 715 Bytes
/
setup.py
File metadata and controls
18 lines (15 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2026 Luis Kobayashi. All rights reserved.
#
# Rust extension is OPTIONAL:
# - PyPI wheel: cpipe binary is pre-built and bundled — no Rust toolchain needed.
# - Editable/dev clone: run `python scripts/fetch_cpipe.py` to download the binary.
# - Source build (CI release): setuptools_rust is installed by the release workflow.
# If setuptools_rust is not available, setup() proceeds without the extension.
from setuptools import setup
try:
from setuptools_rust import RustBin
rust_extensions = [RustBin("cpipe", path="crates/cpipe/Cargo.toml", optional=True)]
except ImportError:
rust_extensions = []
setup(rust_extensions=rust_extensions)