The following steps are the initial instructions to clone the codebase locally and setup a virtualenv.
- Clone repo:
git clone [email protected]:WLAN-Pi/wlanpi-fpms.git && cd wlanpi-fpms
- Create virtualenv:
python3 -m venv venv
- Activate venv:
source venv/bin/activate
- Update pip, setuptool, and wheel (this is only done once)
pip install -U pip setuptools wheel pip-tools
- Install requirements along with the extras
pip install -e .[testing]
The testing
extras install tools like black, mypy, tox, pytest, etc.
Ok, now should be ready to run the code. This version of the fpms is packaged into a module. So, we need to instruct Python to run it as a module with the -m
option.
- Activate the virtualenv
source venv/bin/activate
- We need to run fpms as sudo, which means we'll need to pass along the location of the Python environment to sudo like this:
sudo venv/bin/python3 -m fpms
Or do you want to enable keyboard interactive mode? You can capture screenshots with g
with this mode! Add the -e
arg like this:
sudo venv/bin/python3 -m fpms -e
Further reading on executing modules with Python at https://docs.python.org/3/library/runpy.html.
Is your development environment already setup?
cd <root of repo>
source venv/bin/activate
sudo venv/bin/python3 -m fpms
sudo venv/bin/python3 -m fpms -e