From b573841e49bd18e67500351536579dbc6d9fccf1 Mon Sep 17 00:00:00 2001 From: Jan-Pieter Baert Date: Tue, 19 Apr 2022 19:57:27 +0200 Subject: [PATCH 1/3] Fix python version in first-setup script --- .python-version | 2 +- README.md | 1 + first-setup.sh | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.python-version b/.python-version index 678fd88..a9f8d1b 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.5.3 \ No newline at end of file +3.9.11 diff --git a/README.md b/README.md index ad467b5..26ba6b6 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Be lazier today! ## Local setup There is a special script to get started with the project. Just run it in the root of the project. +Note: this script might require you to install a certain python version, you can do this using your favorite tool e.g. [pyenv](https://github.com/pyenv/pyenv#simple-python-version-management-pyenv) ./first-setup.sh diff --git a/first-setup.sh b/first-setup.sh index dbb4155..954b32e 100755 --- a/first-setup.sh +++ b/first-setup.sh @@ -10,8 +10,10 @@ B="\n${bold}" E="${normal}" if [ ! -d "venv" ]; then - echo -e "${B} No venv found, creating a new one ${E}" - python3 -m venv venv + PYTHON_VERSION=$(cat .python-version) + echo -e "${B} No venv found, creating a new one with version ${PYTHON_VERSION} ${E}" + pip install virtualenv + virtualenv -p $PYTHON_VERSION venv fi source venv/bin/activate From ee65544031a446aa5424c92afa1658ef6585a054 Mon Sep 17 00:00:00 2001 From: Maxime <12089026+mcbloch@users.noreply.github.com> Date: Tue, 19 Apr 2022 20:10:22 +0200 Subject: [PATCH 2/3] Update to use the exact server version --- .python-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.python-version b/.python-version index a9f8d1b..2009c7d 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.9.11 +3.9.2 From c5e9067d59c29c57542dac5d931280aafe7e9427 Mon Sep 17 00:00:00 2001 From: mcbloch Date: Tue, 19 Apr 2022 20:19:23 +0200 Subject: [PATCH 3/3] use module instead of installed bin --- first-setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/first-setup.sh b/first-setup.sh index 954b32e..68eb601 100755 --- a/first-setup.sh +++ b/first-setup.sh @@ -12,8 +12,7 @@ E="${normal}" if [ ! -d "venv" ]; then PYTHON_VERSION=$(cat .python-version) echo -e "${B} No venv found, creating a new one with version ${PYTHON_VERSION} ${E}" - pip install virtualenv - virtualenv -p $PYTHON_VERSION venv + python3 -m virtualenv -p $PYTHON_VERSION venv fi source venv/bin/activate