Build member frontend assets when publishing python_packages wheels
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
The PyPI publish pipeline builds member wheels with a bare uv build, which silently ships frontend-bearing members — e.g. kolibri-sentry-plugin — without their compiled JS bundle. Give every python_packages/ member a Makefile with a dist target that owns its full build (frontend build + compress where needed, then the wheel), and have the publish pipeline call make dist per member instead of assuming uv build suffices.
Complexity: Medium Target branch: develop
Context
- Publishing runs
.github/workflows/pypi_packages_publish.yml→scripts/pypi_publish.sh, which only doesuv build --package <name>thenuv publish. - Members with a frontend output their webpack bundle to a gitignored
static/and ship it via setuptoolsinclude-package-data. Nothing builds thatstatic/in CI, so a fresh checkout packages an emptystatic/. kolibri-build prod --plugins <module>builds a member's bundle;kolibri-build compress <glob>gzips static and writes.gz/.file_sizesidecars.- The root
compressscript is scoped tokolibri/only, so it never touchespython_packages/members. kolibri-sentry-pluginhas abuildscript but no compress; other members may lack build scripts entirely.
The Change
- Every
python_packages/member has aMakefilewith adisttarget that produces its wheel, first running whatever that package needs: a frontend-bearing member builds its bundle (kolibri-build prod) and compresses its static; a backend-only member'sdistjust builds the wheel. scripts/pypi_publish.shbuilds each to-be-published member via itsmake distand publishes the resulting wheel — it makes no assumptions aboutuv buildor frontend layout.- Members whose
distbuilds a frontend require the JS toolchain in the build environment (workspacepnpm installhas run).
Out of Scope
- Extracting
context_translation/demo_server(separate issues that depend on this).
Acceptance Criteria
General
- [ ] Every
python_packages/member has aMakefilewith adisttarget that builds its wheel. - [ ] A frontend-bearing member's
distbuilds its bundle and compresses its static before building the wheel; a backend-only member'sdistjust builds the wheel. - [ ]
scripts/pypi_publish.shbuilds each published member viamake distand publishes the resulting wheel, making nouv buildor frontend-layout assumptions. - [ ] A
dist-builtkolibri-sentry-pluginwheel contains the compiled, compressed JS bundle.
Testing
- [ ] Running
make distfor a frontend-bearing member in a clean checkout (after workspacepnpm install) produces a wheel whose contents include the compiled bundle and its.gz.
References
- Publish pipeline:
.github/workflows/pypi_packages_publish.yml,scripts/pypi_publish.sh - Pattern to mirror: the main Kolibri
disttarget inMakefile(assets built beforeuv build) - Build tooling:
packages/kolibri-build(prod,compress)
AI usage
Drafted with Claude Code, which read the publish workflow and build tooling; I drove every scope decision. I verified the missing-bundle gap and the assets-first pattern against the repo and uv's build-backend docs before creating the issue.
Plan: Give every python_packages/ member a Makefile with a dist target that owns its full build (frontend build + compress where needed, then the wheel), and make scripts/pypi_publish.sh call make dist per member instead of assuming a bare uv build suffices — so kolibri-sentry-plugin's compiled JS bundle actually ships.
- [ ]
distMakefile for the four backend-only members - [ ]
distMakefile forkolibri-sentry-plugin(the frontend-bearing member) - [ ]
scripts/pypi_publish.sh— build viamake distper member - [ ] CI — provide the JS toolchain for the frontend-bearing member's build
- [ ] Document the
Makefilerequirement for future publishable packages
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output
The bot has been waiting for a response for 2 hour(s). It will resume automatically when someone replies.