The (currently unpublished) procedure to rebuild the virtual environment from scratch is: ``` prun python-3.7.4-2 virtualenv venv0 . venv0/bin/activate pip install pip==21.1.0 pip install pip-tools==6.0.1 # pip-compile, pip-sync pip-sync requirements/dev.txt # let virtual environment follow requirements # apply patches.... ( cd venv0 && for pf in ../patches/*; do echo $pf && patch -N --dry-run -p1 < $pf; done ) ( cd venv0 && for pf in ../patches/*; do patch -N -p1 < $pf; done ) ``` pip-sync currently fails with 1 - Missing libldap_r.so ================== ``` gcc -pthread -shared -Wl,-rpath=/pkg/python-3.7.4-2/lib build/temp.linux-x86_64-3.7/Modules/LDAPObject.o build/temp.linux-x86_64-3.7/Modules/ldapcontrol.o build/temp.linux-x86_64-3.7/Modules/common.o build/temp.linux-x86_64-3.7/Modules/constants.o build/temp.linux-x86_64-3.7/Modules/functions.o build/temp.linux-x86_64-3.7/Modules/ldapmodule.o build/temp.linux-x86_64-3.7/Modules/message.o build/temp.linux-x86_64-3.7/Modules/options.o build/temp.linux-x86_64-3.7/Modules/berval.o -L/pkg/python-3.7.4-2/lib -lldap_r -llber -lpython3.7m -o build/lib.linux-x86_64-3.7/_ldap.cpython-37m-x86_64-linux-gnu.so /usr/lib/gcc/x86_64-pc-linux-gnu/12.5.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lldap_r: No such file or directory collect2: error: ld returned 1 exit status ``` See mariux64/mariux64-issues#205 When this is fixed with `sudo ln -s libldap_r-2.4.so.2.10.10 /usr/lib/libldap_r.so`, `pip-sync` fails again with 2 - Cant build safetensors for Python 3.7 ============================== ``` Building wheels for collected packages: wagtailvideos, safetensors Building wheel for wagtailvideos (setup.py): started Building wheel for wagtailvideos (setup.py): finished with status 'done' Created wheel for wagtailvideos: filename=wagtailvideos-2.8.2-py2.py3-none-any.whl size=51754 sha256=2b51a529bf442b9e60dd9bfde0da751dc044c9d5f51c10c07fc77d20a4591566 Stored in directory: /scratch/local/loser/.cache/pip/wheels/c8/69/63/80a87a1252a05788f9140127d6cc054f366c67a74ecac3daca Building wheel for safetensors (PEP 517): started Building wheel for safetensors (PEP 517): finished with status 'error' ERROR: Command errored out with exit status 1: command: /srv/loser/mpicms/venv0/bin/python /srv/loser/mpicms/venv0/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /scratch/local/tmpdk3pmibu cwd: /scratch/local/pip-install-4ommqg7z/safetensors_89162ab2d49143909b6cc6fc94551fc2 Complete output (8 lines): Running `maturin pep517 build-wheel -i /srv/loser/mpicms/venv0/bin/python --compatibility off` πΉ Building a mixed python/rust project π Found pyo3 bindings with abi3 support π Found CPython 3.7m at /srv/loser/mpicms/venv0/bin/python π‘ Using build options features, bindings from pyproject.toml π₯ maturin failed Caused by: None of the found Python interpreters (CPython 3.7) are compatible with the abi3 minimum version (>= 3.8). Please install a compatible Python interpreter. Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/srv/loser/mpicms/venv0/bin/python', '--compatibility', 'off'] returned non-zero exit status 1 ---------------------------------------- ERROR: Failed building wheel for safetensors ``` When Python is changed to 3.8.9 ( `prun python-3.8.9-1 virtualenv venv0` ) and pip to 24.0 and pip-tools to 7.5.2, `pip-sync` succeeds, but the patches fail: 3 - Patches have hardcoded versioned path ================================ ``` ../patches/Fix-typo-in-ogg-media-format-description.patch can't find file to patch at input line 15 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |From a34ec1288a11bd5e27ccc9f693da47c1692f973d Mon Sep 17 00:00:00 2001 |From: Donald Buczek <buczek@molgen.mpg.de> |Date: Tue, 19 Jan 2021 14:44:32 +0100 |Subject: [PATCH] Fix typo in ogg media format description | |https://github.com/neon-jungle/wagtailvideos/pull/50 |--- | lib/python3.7/site-packages/wagtailvideos/models.py | 2 +- | 1 file changed, 1 insertion(+), 1 deletion(-) | |diff --git a/lib/python3.7/site-packages/wagtailvideos/models.py b/lib/python3.7/site-packages/wagtailvideos/models.py |index 75c8e0e..c0ab41b 100644 |--- a/lib/python3.7/site-packages/wagtailvideos/models.py |+++ b/lib/python3.7/site-packages/wagtailvideos/models.py -------------------------- ``` When the paths are changed from lib/python3.7 to lib/python3.8 in the patch files (`sed -i 's|lib/python3\.7|lib/python3.8|g' patches/*.patch`), everything works.