From 0332deed7bf743aa15e967bbfeaf8942c44e1ede Mon Sep 17 00:00:00 2001
From: David Trattnig <david.trattnig@o94.at>
Date: Tue, 8 Dec 2020 19:20:04 +0100
Subject: [PATCH] Python 3.8 as a minimum requirement. #61

---
 .gitlab-ci.yml                   |  9 +--------
 docs/installation-development.md |  2 +-
 docs/installation-production.md  |  2 +-
 install.sh                       |  8 ++++----
 run.py                           |  4 ++--
 run.sh                           | 10 +++++-----
 6 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 41aff226..a7c41c9f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: python:3.7
+image: python:3.8
 
 stages:
   - test
@@ -9,13 +9,6 @@ before_script:
   - apt-get install -y python3-virtualenv virtualenv opam libev4 libev-dev libsndfile1 quelcom # mariadb-server libmariadbclient-dev
   - /usr/bin/virtualenv venv
   - . venv/bin/activate
-  # - opam init --disable-sandboxing -y
-  # - opam switch create 4.08.0
-  # - opam update -y
-  # - opam install depext -y
-  # - opam depext taglib mad lame vorbis flac opus cry samplerate pulseaudio bjack alsa ssl liquidsoap -y
-  # - opam install taglib mad lame vorbis flac opus cry samplerate pulseaudio bjack alsa ssl liquidsoap -y
-  # - eval $(opam env)
   - python3 -V
   - pip3 install -r requirements.txt
   - mkdir /etc/aura
diff --git a/docs/installation-development.md b/docs/installation-development.md
index fa5e686e..22320828 100644
--- a/docs/installation-development.md
+++ b/docs/installation-development.md
@@ -17,7 +17,7 @@
 
 Aura Engine runs on any modern Debian-based OS. It requires at least
 
-- `Python 3.7` or `Python 3.8`
+- `Python 3.8+`
 - `git`
 
 Additionally you'll need these system packages:
diff --git a/docs/installation-production.md b/docs/installation-production.md
index 586cf745..06da73dc 100644
--- a/docs/installation-production.md
+++ b/docs/installation-production.md
@@ -20,7 +20,7 @@
 
 Aura Engine runs on any modern Debian-based OS. It requires at least
 
-- `Python 3.7` or `Python 3.8`
+- `Python 3.8+`
 - `git`
 
 Additionally you'll need these system packages below.
diff --git a/install.sh b/install.sh
index 6df3f6b5..ca6a1172 100755
--- a/install.sh
+++ b/install.sh
@@ -15,12 +15,12 @@ fi
 
 # Find the correct Python version (3.7 or 3.8)
 
-if hash python3.8 2>/dev/null; then
+if hash python3.9 2>/dev/null; then
+	PYTHON_EXEC="python3.9"
+	echo "[ Using Python 3.9 ]"
+else
 	PYTHON_EXEC="python3.8"
 	echo "[ Using Python 3.8 ]"
-else
-	PYTHON_EXEC="python3.7"
-	echo "[ Using Python 3.7 ]"
 fi
 
 # Development and Production
diff --git a/run.py b/run.py
index 717adc2b..e9842d66 100755
--- a/run.py
+++ b/run.py
@@ -1,6 +1,6 @@
 #!/bin/sh
-''''which python3.8 >/dev/null 2>&1 && exec python3.8 "$0" "$@"     # '''
-''''which python3.7  >/dev/null 2>&1 && exec python3.7  "$0" "$@"   # '''
+''''which python3.9 >/dev/null 2>&1 && exec python3.9 "$0" "$@"     # '''
+''''which python3.8  >/dev/null 2>&1 && exec python3.8  "$0" "$@"   # '''
 ''''exec echo "Error: Snaaakey Python, where are you?"                # '''
 
 #
diff --git a/run.sh b/run.sh
index b5103763..2ea17f19 100755
--- a/run.sh
+++ b/run.sh
@@ -32,14 +32,14 @@ echo "[ Run mode=$mode ]"
 echo "[ Docker=$docker ]"
 
 
-# Find the correct Python version (3.7 or 3.8)
+# Find the correct Python version (3.8 or 3.9)
 
-if hash python3.8 2>/dev/null; then
+if hash python3.9 2>/dev/null; then
+	PYTHON_EXEC="python3.9"
+	echo "[ Using Python 3.9 ]"
+else
 	PYTHON_EXEC="python3.8"
 	echo "[ Using Python 3.8 ]"
-else
-	PYTHON_EXEC="python3.7"
-	echo "[ Using Python 3.7 ]"
 fi
 
 
-- 
GitLab