diff --git a/.gitignore b/.gitignore index aaf7f436..b3835cb7 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ game/webrtc/ # OSX ignores .DS_Store + +# Python ignores +env/ diff --git a/docs/README.md b/docs/README.md index e5218bbc..ced222f5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,11 +4,25 @@ The documentation is built using [Sphinx](https://www.sphinx-doc.org/en/master/) ## Requirements -To build the documentation, you will need to install a few Python packages, -which you can do with the following command: +To build the documentation, you will first need to create a Python virtual +environment so you can install packages without affecting your system: ```bash -python3 -m pip install -r requirements.txt +python3 -m venv env +``` + +Then, activate the environment and install the necessary packages: + +```bash +source env/bin/activate +pip3 install -r requirements.txt +``` + +Once you are done building the documentation, you can then use `deactivate` at +any time to exit out of the virtual environment: + +```bash +deactivate ``` ## Building @@ -23,7 +37,8 @@ To build the documentation on Windows: make.bat html ``` -You can then visit the documentation by opening `_build/html/index.html` in the web browser of your choice. +You can then view the documentation by opening `_build/html/index.html` in the +web browser of your choice. ## Cleaning diff --git a/game/Translations/extract_pot.sh b/game/Translations/extract_pot.sh index 752b8a58..ff7812f7 100755 --- a/game/Translations/extract_pot.sh +++ b/game/Translations/extract_pot.sh @@ -1,7 +1,14 @@ #!/bin/bash +# NOTE: This script needs to be run within a Python virtual environment (venv): +# +# python3 -m venv env +# source env/bin/activate +# ./extract_pot.sh +# deactivate + # Install the Python packages. -python3 -m pip install -r requirements.txt +pip3 install -r requirements.txt # Extract the .pot file. pybabel extract -F babelrc.txt -k text -k LineEdit/placeholder_text -k tr \