-
Notifications
You must be signed in to change notification settings - Fork 501
Description
Description
OpenEdx Docker image build fails during uv pip install -r base.txt because loremipsum==1.0.5 (a transitive dependency via ora2) cannot be built.
Root cause: setuptools 81.0.0 (released Feb 6, 2026) removed the pkg_resources module. When uv builds loremipsum in an isolated environment, it installs the latest setuptools (now >= 81), which no longer includes pkg_resources. The loremipsum package imports pkg_resources at build time in its setup.py but doesn't declare setuptools as a build dependency.
Error
[python-requirements 3/9] RUN uv pip install -r base.txt -r assets.txt
× Failed to build `loremipsum==1.0.5`
├─▶ The build backend returned an error
╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed
File ".../loremipsum/generator.py", line 8, in <module>
from pkg_resources import resource_string
ModuleNotFoundError: No module named 'pkg_resources'
Environment
- Tutor: 21.0.0 (Ulmo)
- uv: 0.9.18 (from Dockerfile template)
- edx-platform: release/ulmo.1
- setuptools in build isolation: >= 81.0.0 (latest from PyPI)
Impact
This affects all Tutor 21.x OpenEdx image builds starting Feb 6, 2026 when setuptools 81.0.0 was released. Any build without a Docker layer cache for the base requirements step will fail.
Workaround
Disable uv build isolation for loremipsum using a Tutor plugin with openedx-dockerfile-minimal patch:
from tutor import hooks
hooks.Filters.ENV_PATCHES.add_item((
"openedx-dockerfile-minimal",
"""
# Fix: loremipsum 1.0.5 needs setuptools (pkg_resources) at build time
# but doesn't declare it. Disable uv build isolation for this package.
RUN printf '[pip]\\nno-build-isolation-package = ["loremipsum"]\\n' > /etc/uv.toml
ENV UV_CONFIG_FILE=/etc/uv.toml
"""
))Suggested fix
Consider one of:
- Add
no-build-isolation-package = ["loremipsum"]to the Dockerfile template's uv config - Pin
setuptools<81in the build isolation environment - Coordinate with edx-ora2 to replace the unmaintained
loremipsumdependency
Metadata
Metadata
Assignees
Labels
Type
Projects
Status