mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-21 23:01:52 +00:00
New OS and venv tool
This commit is contained in:
parent
d607b30953
commit
293eb10ffd
29
os-trog.sh
Normal file
29
os-trog.sh
Normal file
@ -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
|
13
requirements-p10d3.txt
Normal file
13
requirements-p10d3.txt
Normal file
@ -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
|
@ -10,3 +10,4 @@ reportlab==3.6.8
|
||||
sqlparse==0.2.4
|
||||
typing-extensions==3.7.4.3
|
||||
Unidecode==1.0.23
|
||||
mariadb
|
||||
|
16
venv-trog.sh
16
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."
|
||||
|
Loading…
Reference in New Issue
Block a user