Change build-backend to not build data files in build_editable.

Review Request #14734 — Created Dec. 12, 2025 and updated

Information

Review Board
release-7.1.x

Reviewers

I ran into an interesting chicken-and-egg issue attempting to set up a
new virtualenv in order to fully verify the JS build changes. We
currently can't install an editable build with isolation on Python 3.8,
because the currently released version of typelets has an
incompatibility. Attempting pip install --no-build-isolation -e .
fails in a different way: it tries to run build-media.py, which fails
because Review Board and it's dependencies are not installed into the
virtualenv until after the editable build is already set up.

Tracing through all this, it turned out that we're invoking
build-media.py with RUN_COLLECT_STATIC=0, which makes it actually just
do an npm install and nothing else. Given that, I've changed it so
when we're doing an editable install, we run npm install from the
build backend instead of attempting to build static media or i18n files.
This allows doing an editable install without build isolation.

Was able to do pip install --no-build-isolation -e . in RB 7.1 in a
Python 3.8 virtualenv that already had editable installs of Djblets and
typelets in it. Verified that doing so installed NPM packages
appropriately.

Summary ID
Change build-backend to not build data files in build_editable.
I ran into an interesting chicken-and-egg issue attempting to set up a new virtualenv in order to fully verify the JS build changes. We currently can't install an editable build with isolation on Python 3.8, because the currently released version of typelets has an incompatibility. Attempting `pip install --no-build-isolation -e .` fails in a different way: it tries to run `build-media.py`, which fails because Review Board and it's dependencies are not installed into the virtualenv until *after* the editable build is already set up. Tracing through all this, it turned out that we're invoking build-media.py with RUN_COLLECT_STATIC=0, which makes it actually just do an `npm install` and nothing else. Given that, I've changed it so when we're doing an editable install, we run `npm install` from the build backend instead of attempting to build static media or i18n files. This allows doing an editable install without build isolation. Testing Done: Was able to do `pip install --no-build-isolation -e .` in RB 7.1 in a Python 3.8 virtualenv that already had editable installs of Djblets and typelets in it. Verified that doing so installed NPM packages appropriately.
lqvmyzzylqrzkysooluynynutxxxwpoz
Checks run (2 succeeded)
flake8 passed.
JSHint passed.