Skip to content

Commit

Permalink
Now install Python packages to virtual environments.
Browse files Browse the repository at this point in the history
  • Loading branch information
drwhut committed Sep 4, 2024
1 parent 03c5eeb commit b42785d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ game/webrtc/

# OSX ignores
.DS_Store

# Python ignores
env/
23 changes: 19 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
9 changes: 8 additions & 1 deletion game/Translations/extract_pot.sh
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down

0 comments on commit b42785d

Please sign in to comment.