From 9b97082ea02a8e743c66bed7e765ddc0f9809247 Mon Sep 17 00:00:00 2001 From: Plamen Dimitrov Date: Fri, 2 Aug 2024 19:05:00 +0200 Subject: [PATCH] Fix runaway dependencies that our fixed dependencies don't control In particular lock the numpy version to avoid an update to a major 2.0 yet and incremental version to previously known working one. Even though we don't explicitly control the numpy version (but implicitly via other dependencies that we hope have overall sane requirements) a recent release of NumPy 2.0 breaks the way it is used in OpenCV and PyTorch which at the same time don't demand a safe version (and rather seem to download the latest one). The way around this is to do some of their work for them and require a sane version that their fixed and controlled version will still work with. Same applices for vncdotool's Twisted dependency. --- packaging/packager_deb.sh | 2 ++ packaging/packager_rpm.sh | 2 ++ packaging/pip_requirements.txt | 2 ++ 3 files changed, 6 insertions(+) diff --git a/packaging/packager_deb.sh b/packaging/packager_deb.sh index ea91c6fc..0fd33adf 100644 --- a/packaging/packager_deb.sh +++ b/packaging/packager_deb.sh @@ -34,6 +34,8 @@ fi pip3 install torch==1.8.1 torchvision==0.9.1 # screen controlling pip3 install autopy==4.0.0 +# TODO: vncdotool doesn't control its Twisted which doesn't control its "incremental" dependency +pip3 install incremental==22.10.0 pip3 install vncdotool==0.12.0 apt-get -y install xdotool x11-apps imagemagick apt-get -y install python3-tk scrot diff --git a/packaging/packager_rpm.sh b/packaging/packager_rpm.sh index c4673c50..15646b7f 100644 --- a/packaging/packager_rpm.sh +++ b/packaging/packager_rpm.sh @@ -27,6 +27,8 @@ if (( distro_version <= 32 )); then else export DISABLE_AUTOPY=1 fi +# TODO: vncdotool doesn't control its Twisted which doesn't control its "incremental" dependency +pip3 install incremental==22.10.0 pip3 install vncdotool==0.12.0 dnf -y install xdotool xwd ImageMagick # NOTE: PyAutoGUI's scrot dependencies are broken on Fedora 33- so we don't support these diff --git a/packaging/pip_requirements.txt b/packaging/pip_requirements.txt index 34685669..5a4636c0 100644 --- a/packaging/pip_requirements.txt +++ b/packaging/pip_requirements.txt @@ -7,6 +7,8 @@ autopy==4.0.0; python_version <= '3.8' and platform_python_implementation != "Py # OCR is currently not tested on Windows due to custom Tesseract OCR installers pytesseract==0.3.4; sys_platform != 'win32' tesserocr==2.5.1; sys_platform != 'win32' +# TODO: OpenCV and PyTorch don't control their "numpy" dependency +numpy==1.26.4; platform_python_implementation != "PyPy" opencv-contrib-python==4.5.5.62; platform_python_implementation != "PyPy" torch==2.2.0; 'generic' not in platform_release and platform_python_implementation != "PyPy" torchvision==0.17.0 ; 'generic' not in platform_release and platform_python_implementation != "PyPy"