diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-03-13 06:26:18 -0500 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-03-13 06:26:18 -0500 |
| commit | de4db79e5158017c002cc91c14fa9e58420e7774 (patch) | |
| tree | 74f8781aef49afa4e1cc3ba94c5a08876cadab0f /docker/Dockerfile | |
| parent | 84a43a2e6afbdfab92c610d47aa75e3876ffacd6 (diff) | |
Bundle PBS Python 3.12 + PyQt6, restore Python plugins as .py files
- Replace portable Python approach with python-build-standalone 3.12.13
(20260310 release) bundled directly in the distribution. Python is now
always available without user setup — removes the Python settings tab.
- PyQt6 staged to plugins/libs/PyQt6/ with bundled Qt stripped out;
patchelf'd to use our existing bundled Qt in lib/ instead of duplicating it.
- Restored native-converted plugins back to .py files:
Form43Checker, ScriptExtenderPluginChecker, DDSPreview, basic_games,
rootbuilder, installer_omod. Removed all *_native CMake targets.
- pythonrunner.cpp: removed venv/MO2_PYTHON_DIR lookup; always uses
bundled Python at <exe_dir>/python, system Python as last-resort fallback.
- plugincontainer.cpp: removed fluorine/python_enabled gate (Python always
loads), demoted proxy loading log messages from warn to debug, silenced
[plugin-diag] stderr spam.
- Dockerfile: switched from uv venv to PBS install_only tarball; PBS Python
used for both build-time pybind11 compilation and runtime distribution.
- build-inner.sh: aggressive Python staging (strip test/tkinter/ensurepip/
distutils/lib2to3/idlelib; wipe build-time site-packages, restore psutil+vdf).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'docker/Dockerfile')
| -rw-r--r-- | docker/Dockerfile | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 5ab99dc..ec5653b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -50,16 +50,23 @@ ENV CMAKE_PREFIX_PATH="/opt/qt6/6.10.2/gcc_64:${CMAKE_PREFIX_PATH}" ENV PATH="/opt/qt6/6.10.2/gcc_64/bin:${PATH}" ENV LD_LIBRARY_PATH="/opt/qt6/6.10.2/gcc_64/lib:${LD_LIBRARY_PATH}" -# ── uv (Python package manager) ── -RUN curl -LsSf https://astral.sh/uv/install.sh | sh -ENV PATH="/root/.local/bin:${PATH}" +# ── python-build-standalone 3.12 (build-time + bundled runtime) ── +# Single Python for both compiling pybind11 modules and shipping in the tarball. +# The install_only_stripped tarball is ~28MB; we strip it further in build-inner.sh. +ARG PBS_VERSION=3.12.13 +ARG PBS_DATE=20260310 +RUN curl -fL --retry 3 -o /tmp/pbs-python.tar.gz \ + "https://github.com/astral-sh/python-build-standalone/releases/download/${PBS_DATE}/cpython-${PBS_VERSION}%2B${PBS_DATE}-x86_64-unknown-linux-gnu-install_only.tar.gz" && \ + tar xzf /tmp/pbs-python.tar.gz -C /opt/ && \ + mv /opt/python /opt/python-bundled && \ + rm /tmp/pbs-python.tar.gz +ENV BUILD_PYTHON=/opt/python-bundled/bin/python3 +ENV PATH="/opt/python-bundled/bin:${PATH}" -# ── Build-time Python venv (pybind11, sip, etc.) ── -RUN uv venv /opt/build-python --python 3.13 --seed && \ - uv pip install --python /opt/build-python/bin/python \ - pybind11==2.13.6 sip psutil vdf -ENV BUILD_PYTHON=/opt/build-python/bin/python -ENV PATH="/opt/build-python/bin:${PATH}" +# ── Build-time Python packages ── +# pybind11/sip/etc. for compiling mobase.so; PyQt6 is staged into the distribution. +RUN /opt/python-bundled/bin/pip3 install --no-cache-dir \ + pybind11==2.13.6 sip psutil vdf PyQt6 # ── Rust toolchain ── RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ |
