Skip to content

Commit

Permalink
Fix runaway dependencies that our fixed dependencies don't control
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pevogam committed Aug 2, 2024
1 parent b199ce3 commit 9b97082
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packaging/packager_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions packaging/packager_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions packaging/pip_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9b97082

Please sign in to comment.