From bf37ebaf8eefc31711883dff012f065536bba501 Mon Sep 17 00:00:00 2001 From: David Trattnig <david.trattnig@o94.at> Date: Tue, 8 Dec 2020 19:56:26 +0100 Subject: [PATCH] Python 3.8 as min requirement. #17 --- .gitlab-ci.yml | 2 +- .travis.yml | 2 +- Dockerfile | 2 +- README.md | 6 +++--- run.sh | 16 ++++------------ 5 files changed, 10 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6496dff..adf15dd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: python:3.7-buster +image: python:3.8-buster stages: - bundle diff --git a/.travis.yml b/.travis.yml index e06c856..bde0847 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ # ref: https://docs.travis-ci.com/user/languages/python language: python python: - - "3.7" + - "3.8" # command to install dependencies install: "pip3 install -r requirements.txt" # command to run tests diff --git a/Dockerfile b/Dockerfile index 5f412ab..da5fc88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.7-buster +FROM python:3.8-buster # Initialize the project structure diff --git a/README.md b/README.md index 92d895d..a27b2df 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ The most simple way to get started is by running Engine API using [Docker](https If you are not planning to go with Docker or just want to setup a local development environment, then you'll need: -- [Python 3.7+](https://www.python.org/) +- [Python 3.8+](https://www.python.org/) - [MariaDB](https://mariadb.org/) - [Virtualenv](https://virtualenv.pypa.io/en/latest/) @@ -123,7 +123,7 @@ If you are not planning to go with Docker or just want to setup a local developm Create a virtual environment for your Python dependencies: ```bash -virtualenv -p python3.7 python +virtualenv -p python3.8 python ``` To activate that environment, run @@ -370,7 +370,7 @@ All model files can usually be overwritten. Only controller and test classes nee In the future it might be favorable to use a local Codegen to generate the API artifacts. -> Caveat: There is an issue with the generated source related to Python 3.7. Therefore `./src/rest/util.py` contains a workaround. Think about that when +> Caveat: There is an issue with the generated source related to Python 3.8. Therefore `./src/rest/util.py` contains a workaround. Think about that when overwriting the existing file. ### Creating a local image diff --git a/run.sh b/run.sh index 61e8240..397178b 100755 --- a/run.sh +++ b/run.sh @@ -43,8 +43,6 @@ if [[ $docker == "false" ]]; then if [[ $mode == "api-dev" ]]; then echo "Activating Python Environment" source python/bin/activate - # echo "Building Web Applications" - # sh ./script/build-web.sh echo "Starting API Server" python src/app.py fi @@ -52,22 +50,16 @@ if [[ $docker == "false" ]]; then ### Runs the API Server (Test) ### if [[ $mode == "api-test-0" ]]; then - # echo "Building Web Applications" - # sh ./script/build-web.sh echo "Starting API Server 0" - /usr/bin/env python3.7 src/app.py config=tests/config/engine-0-api.ini + /usr/bin/env python3 src/app.py config=tests/config/engine-0-api.ini fi if [[ $mode == "api-test-1" ]]; then - # echo "Building Web Applications" - # sh ./script/build-web.sh echo "Starting API Server 1" - /usr/bin/env python3.7 src/app.py config=tests/config/engine-1-api.ini + /usr/bin/env python3 src/app.py config=tests/config/engine-1-api.ini fi if [[ $mode == "api-test-2" ]]; then - # echo "Building Web Applications" - # sh ./script/build-web.sh echo "Starting API Server 2" - /usr/bin/env python3.7 src/app.py config=tests/config/engine-2-api.ini + /usr/bin/env python3 src/app.py config=tests/config/engine-2-api.ini fi ### Runs the API Server using Gunicorn without a system daemon (Production) ### @@ -87,7 +79,7 @@ if [[ $docker == "false" ]]; then ### CAUTION: This deletes everything in your database ### if [[ $mode == "recreate-database" ]]; then - /usr/bin/env python3.7 src/app.py --recreate-database + /usr/bin/env python3 src/app.py --recreate-database fi fi -- GitLab