From 73e0e803789c42ccad4b9fafae9c7749d85e4acf Mon Sep 17 00:00:00 2001
From: baloola <baloola-mu@hotmail.com>
Date: Thu, 29 Oct 2020 11:17:32 +0100
Subject: [PATCH] check python gdal

---
 testing/gitlab_test.sh       | 4 ++--
 testing/preprocessor_test.py | 8 +++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/testing/gitlab_test.sh b/testing/gitlab_test.sh
index b7d3dc9b..4ae1c238 100755
--- a/testing/gitlab_test.sh
+++ b/testing/gitlab_test.sh
@@ -39,10 +39,10 @@ printf $sftp_users_emg | docker config create sftp_users_emg -
 docker stack deploy -c ../docker-compose.emg.yml -c ../docker-compose.emg.dev.yml emg-pvs
 
 # installing the requirments
-apk update && apk add bash postgresql-dev gcc g++ python3-dev musl-dev py-pip libffi-dev openssl-dev make gdal gdal-dev
+apk update && apk add bash postgresql-dev gcc g++ python3 python3-dev musl-dev py-pip libffi-dev openssl-dev make gdal gdal-dev
 pip3 install -r requirements.txt
 
-python preprocessor_test.py
+python3 preprocessor_test.py
 ./docker-stack-wait.sh -n renderer -n registrar -n preprocessor -n ingestor -n sftp emg-pvs
 
 docker service ls
diff --git a/testing/preprocessor_test.py b/testing/preprocessor_test.py
index 45782acc..56f8ce77 100644
--- a/testing/preprocessor_test.py
+++ b/testing/preprocessor_test.py
@@ -1 +1,7 @@
-from osgeo import gdal
\ No newline at end of file
+import sys
+from osgeo import gdal
+
+version_num = int(gdal.VersionInfo('VERSION_NUM'))
+print(version_num)
+if version_num < 1100000:
+    sys.exit('ERROR: Python bindings of GDAL 1.10 or later required')
\ No newline at end of file
-- 
GitLab