Skip to content

Commit c77a0a0

Browse files
committed
Install hatchling in release CI so --no-isolation wheel build works
build_wheels.sh runs `python -m build --no-isolation`, which requires the build backend (hatchling) to already be importable. The release workflow only installed `build wheel`, so the wheel build failed with 'Backend hatchling.build is not available'. Add hatchling to the install step and to the documented build requirements.
1 parent 94f78f1 commit c77a0a0

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ jobs:
8080
python-version: "3.11"
8181

8282
- name: Install Python build tooling
83-
run: python -m pip install --upgrade build wheel
83+
# hatchling is the build backend; build_wheels.sh runs `python -m build
84+
# --no-isolation`, so it must be present in this env (no auto-install).
85+
run: python -m pip install --upgrade build wheel hatchling
8486

8587
- name: Build platform wheels (cross-compiles every target via Bun)
8688
working-directory: packaging/python

packaging/python/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ sdist: the binary cannot be built without Bun.
1919
## Building & publishing
2020

2121
```bash
22-
python -m pip install build wheel twine
22+
python -m pip install build wheel hatchling twine
2323
./build_wheels.sh # cross-compiles every target via Bun, emits ./dist/*.whl
2424
twine upload dist/*.whl
2525
```

packaging/python/build_wheels.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
#
1010
# Requirements on the build host:
1111
# - bun (https://bun.sh) -- cross-compiles all targets from one host
12-
# - python -m pip install build wheel twine
12+
# - python -m pip install build wheel hatchling twine
13+
# (hatchling is the build backend; --no-isolation means it must be installed)
1314
#
1415
# Usage:
1516
# ./build_wheels.sh # build all targets into ./dist

0 commit comments

Comments
 (0)