Publish baml package to `baml` instead of `baml-py`
we own baml already. We should publish to this package and deprecate baml-py. It will reduce new-user onboarding friction.
We could fix pip install baml with CI/CD Stub Package
Problem
pip install baml is currently broken, leading to undefined behavior. Many users likely try installing it, only to hit unexpected issues.
Simple Solution
Automate a CI/CD pipeline to publish a stub baml package that strictly depends on baml-py with the exact same version.
Example:
-
baml==0.12.3→ requires exactlybaml-py==0.12.3
Why This Works
- Immediate fix: Users no longer get a broken experience.
- Minimal effort: Just an automated sync in CI/CD.
-
Future flexibility: We can later flip the dependency direction (make
baml-pythe stub) and eventually deprecatebaml-py(warnings → errors).
This makes the issue low priority after implementation, with no user disruption.
Put simply, this is the smallest setup needed to automate baml uploads to PyPI.
- Detect a new baml-py release
- Generate pyproject.toml with the same version
- Run the build & upload script
Contents of baml source code:
baml/
├── pyproject.toml # Defines the package and its dependency on `baml-py`
Contents of pyproject.toml:
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "baml"
version = "0.76.2" # Must match `baml-py`
dependencies = ["baml-py==0.76.2"]
description = "Stub package for baml-py"
readme = "This package exists only to install `baml-py`. Use `baml-py` directly instead."
Hi, just revisiting this before the ship sails too far away from the port :)