Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to install files using Pip #519

Merged
merged 2 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
21 changes: 21 additions & 0 deletions run-pip.sh
Original file line number Diff line number Diff line change
@@ -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
algmyr marked this conversation as resolved.
Show resolved Hide resolved

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