// readme

rules_pycross β€” Python + cross platform

rules_pycross lets you use Python lock files with Bazel, enabling cross-platform, hermetic builds of Python dependencies β€” including native extensions.

[!NOTE] 2.0 is a major overhaul of rules_pycross (#243); see the CHANGELOG for breaking changes. The 1.x line lives on the v1 branch.

Features

  • Import lock files from uv, PDM, Poetry, or PEP 751 pylock.toml
  • Build source distributions inside Bazel build actions, not during workspace initialization
  • Pluggable build backends: setuptools, meson, cmake, maturin, and generic PEP 517
  • Cross-platform sdist builds β€” build wheels for Linux and macOS from either host with a hermetic cross-compilation toolchain (hermetic-llvm, BCR module llvm)
  • Multi-workspace support for monorepos with shared dependency deduplication
  • Conflict/variant resolution for mutually exclusive dependencies (e.g., torch CPU vs. CUDA)
  • Compatible with…