diff --git a/README.md b/README.md index 414428ac..7352712b 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,8 @@ python3.7 -m pip install poetry python3.7 -m poetry install ``` +On some systems, Poetry is not able to install TLE's dependencies correctly. If you are unable to run `poetry install` without errors after completing the steps below, see the note at the end of the *final steps* section. + --- #### Library dependencies @@ -91,6 +93,14 @@ To start TLE just run: ./run.sh ``` +On some systems, Poetry is unable to correctly install TLE's dependencies even after completing the above steps. In this case, using Pip to manage the dependencies instead may work. Note that Poetry still must be installed. + +To install dependencies in a virtual environment using Pip and start TLE, just run: + +```bash +./run-pip.sh +``` + ### Notes - In order to run admin-only commands, you need to have the `Admin` role, which needs to be created in your Discord server and assign it to yourself/other administrators. diff --git a/run-pip.sh b/run-pip.sh new file mode 100755 index 00000000..c73e402f --- /dev/null +++ b/run-pip.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Get to a predictable directory, the directory of this script +cd "$(dirname "$0")" + +[ -e environment ] && . ./environment +python3 -m venv .venv +. .venv/bin/activate + +while true; do + git pull + poetry export --without-hashes > requirements.txt + python -m pip install --requirement requirements.txt + FONTCONFIG_FILE=$PWD/extra/fonts.conf python -m tle + + (( $? != 42 )) && break + + echo '===================================================================' + echo '= Restarting =' + echo '===================================================================' +done