From 9c67e64d2de617e213f09ebd50beaa4908c49a86 Mon Sep 17 00:00:00 2001 From: Plamen Dimitrov Date: Thu, 1 Oct 2020 20:46:56 +0300 Subject: [PATCH] Disable OCR tests on the aged Python 3.5 and Ubuntu Xenial platform Xenial starts accumulating problems with tesserocr and its tesseract dependencies (e.g. leptonica development library) and we already test both OpenCV 3.X and OpenCV 4.X OCR on the newer Bionic and Focal platforms respectively. The accumulated restrictions on Python 3.5 are nearly all now. --- .travis.yml | 1 + packaging/packager_deb.sh | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9ce1ae08..79877d58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,6 +55,7 @@ before_script: - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1024x768x24" - sleep 3 # give xvfb some time to start +- if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then export DISABLE_OCR=1; fi - if [[ $TRAVIS_PYTHON_VERSION == 'pypy3.5' ]]; then export DISABLE_AUTOPY=1; fi - if [[ $TRAVIS_PYTHON_VERSION == 'pypy3.5' ]]; then export DISABLE_PYQT=1; fi - if [[ $TRAVIS_PYTHON_VERSION == 'pypy3.5' ]]; then export DISABLE_OPENCV=1; fi diff --git a/packaging/packager_deb.sh b/packaging/packager_deb.sh index bcf0587a..154eeab2 100644 --- a/packaging/packager_deb.sh +++ b/packaging/packager_deb.sh @@ -21,9 +21,13 @@ else apt-get -y install python3-opencv fi # text matching -apt-get -y install tesseract-ocr libtesseract-dev -apt-get -y install g++ pkg-config -pip3 install pytesseract==0.3.4 tesserocr==2.5.1 +if [[ $distro_version == "xenial" ]]; then + export DISABLE_OCR=1 +else + apt-get -y install tesseract-ocr libtesseract-dev + apt-get -y install g++ pkg-config + pip3 install pytesseract==0.3.4 tesserocr==2.5.1 +fi # deep learning pip3 install torch==1.4.0 torchvision==0.5.0 # screen controlling