From de4db79e5158017c002cc91c14fa9e58420e7774 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Fri, 13 Mar 2026 06:26:18 -0500 Subject: Bundle PBS Python 3.12 + PyQt6, restore Python plugins as .py files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 /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 --- docker/Dockerfile | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'docker/Dockerfile') 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 | \ -- cgit v1.3.1