A modern Python ruleset
summary
A pure Starlark Python ruleset (DBX build tools) that Bazel builds into self-contained runfiles with a hermetic Python interpreter, generated .pyc caches, and pip-driven wheel builds for third‑party packages including native C/C++ deps. It claims to handle millions of lines of Python in production, provides PyPI and local pip rules, PyTest integration, and a build file generator that infers deps from imports. Works well on Linux; Windows/Mac hermetic interpreters and cross‑platform distribution remain unfinished.
AI-written summary · about
chapters (16)
- 0:00Dropbox’s Python ruleset intro
- 1:49Why Dropbox built its rules
- 3:12Python rules core structure
- 4:14Testing support in rules
- 5:57Python packaging challenges
- 7:01Integrating third-party libs
- 9:31Complex dependencies handling
- 10:36Forking third-party code
- 11:19Automated build file gen
- 12:43Multi-Python version support
- 13:25How rules work internally
- 14:49Hermetic third-party builds
- 16:15Repo layout assumptions
- 17:38Building from source
- 18:20Current limits and improvements
- 19:24Future Python packaging challenges
related talks
09mPython and Bazel: Aspect’s rules_py
01h 01mIntroduction to Bazel
07mLightning Talk – Python Dependencies the Right Way
31mBazel Federation + Q&A
27mPython in Bazel
09mBuilding a Hermetic Python Environment with Conda in Bazel
01h 31mBazel
09mLightning Talk – A short overview of our company's journey to sandbox Python
