diff --git a/os-trog.sh b/os-trog.sh new file mode 100644 index 0000000..d145422 --- /dev/null +++ b/os-trog.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# Run this in a terminal in the troggle directory: 'bash os-trog.sh' +echo 'Run this in a terminal in the troggle directory: "bash venv-trog.sh"' + +# Expects an Ubuntu 22.04 relatively clean install. + + +python --version : ensure python is an alias for python3 not python2.7 +sudo apt update +sudo apt dist-upgrade +sudo apt install sqlite3 +sudo apt install python3-pip # this installs a shed-load of other stuff: binutils etc. + + +# On a clean debian 11 (bullseye) installation with Xfce & ssh, +# as debian does not install everything that ubuntu does, you need: +sudo usermod -a -G sudo expo # to put expo in sudoers group, re-login required +sudo apt install python3.10 +sudo apt install python3.10-venv +sudo apt install python3.10-dev +sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 + +sudo apt -y install mariadb-server +sudo apt install libmariadb-dev + +sudo python -m pip install --upgrade pip + +# Go to https://expo.survex.com/handbook/troggle/troglaptop.html#dbtools +# sudo service mysql start diff --git a/requirements-p10d3.txt b/requirements-p10d3.txt new file mode 100644 index 0000000..82024e9 --- /dev/null +++ b/requirements-p10d3.txt @@ -0,0 +1,13 @@ +asgiref==3.3.4 +confusable-homoglyphs==3.2.0 +coverage==5.5 +Django==3.2 +docutils==0.14 +gunicorn==20.1.0 +mariadb==1.0.11 +Pillow==9.0.1 +pytz==2019.1 +reportlab==3.6.8 +sqlparse==0.2.4 +typing-extensions==3.7.4.3 +Unidecode==1.0.23 diff --git a/requirements.txt b/requirements.txt index ff5b804..d774a94 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,3 +10,4 @@ reportlab==3.6.8 sqlparse==0.2.4 typing-extensions==3.7.4.3 Unidecode==1.0.23 +mariadb diff --git a/venv-trog.sh b/venv-trog.sh index 7c10473..0439008 100644 --- a/venv-trog.sh +++ b/venv-trog.sh @@ -2,17 +2,19 @@ # Run this in a terminal in the troggle directory: 'bash venv-trog.sh' echo 'Run this in a terminal in the troggle directory: "bash venv-trog.sh"' -# Expects an Ubuntu 20.04 relatively clean install. -# Running using SQLite 3.31.1 2020-01-27 19:55:54 +# Expects an Ubuntu 22.04 relatively clean install. +# Running using SQLite version 3.37.2 2022-01-06 13:25:41 # Many permissions conflicts under WSL2 mean more sudo needed # If you have not already installed these on your clean Ubuntu install DO THIS FIRST -# /usr/bin/python --version : ensure python is an alias for python3 not python2.7 +# use the script os-trog.sh + +# python --version : ensure python is an alias for python3 not python2.7 # sudo apt install sqlite3 # sudo apt install python3-pip # this installs a shed-load of other stuff: binutils etc. -# sudo apt install python3.9 -# sudo apt install python3.9-venv -# sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 +# sudo apt install python3.10 +# sudo apt install python3.10-venv +# sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 # on WSL there is an oddity that creating a venv trips over a PowerShell permissions issue @@ -30,7 +32,7 @@ echo 'Run this in a terminal in the troggle directory: "bash venv-trog.sh"' # # copy this file and requirements.txt into the directory above where you want to install the VENV -VENAME=p310 # python3.10 and django 3.2 +VENAME=p10d3 # python3.10 and django 3.2 if [ -d requirements.txt ]; then echo "No requirements.txt found. Copy it from your most recent installation."