summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParker <20159000+jpburnett@users.noreply.github.com>2023-11-09 14:18:34 -0800
committerGitHub <noreply@github.com>2023-11-10 09:18:34 +1100
commitf2347000b0d91e96ad9477a16b0bb43b48210fbd (patch)
treec683af75f6ad4f131117ba1b9ff85ed55055794d
parent7681c97df002c2ab07f942d077f5ff3efbe9471d (diff)
Update README with python venv instructions (#1372)
This change updates the README to include instructions for setting up a python virtual environment.
-rw-r--r--.gitignore1
-rw-r--r--README.md22
2 files changed, 20 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index ee2d1e325..8c5705f18 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,3 +54,4 @@ docs/doxygen/
# Per-user configuration
.python-version
.make_options
+.*env
diff --git a/README.md b/README.md
index 89d651dbd..d5f2255fd 100644
--- a/README.md
+++ b/README.md
@@ -68,12 +68,13 @@ The build process has the following package requirements:
* python3
* pip3
* libpng-dev
+* python3-venv
Under Debian / Ubuntu (which we recommend using), you can install them with the following commands:
```bash
sudo apt update
-sudo apt install make git build-essential binutils-mips-linux-gnu python3 python3-pip libpng-dev
+sudo apt install make git build-essential binutils-mips-linux-gnu python3 python3-pip libpng-dev python3-venv
```
#### 2. Clone the repository
@@ -94,12 +95,27 @@ cd mm
The build process has a few python packages required that are located in `requirements.txt`.
-To install them simply run in a terminal:
+It is recommend to setup a virtual environment for python to localize all dependencies. To create a virtual environment:
```bash
-python3 -m pip install -r requirements.txt
+python3 -m venv .mm-env
```
+To activate or deactivate the virtual environment run either:
+```bash
+# Activates the mm-env virtual environment
+source .mm-env/bin/activate
+# Deactivates the active virtual environment
+deactivate
+```
+
+Once activated you can install the required dependencies:
+```bash
+pip install -r requirements.txt # or python3 -m pip if you want
+```
+
+**Important:** This virtual environment will need to be activated everytime you enter the repo.
+
#### 4. Prepare a base ROM
Copy your ROM to inside the root of this new project directory, and rename the file of the baserom to reflect the version of ROM you are using. ex: `baserom.mm.us.rev1.z64`