From bf961484618d7b1a539342833fca18d32211e77a Mon Sep 17 00:00:00 2001 From: Michael Iseli Date: Wed, 5 Jan 2022 09:51:17 +0100 Subject: [PATCH] Add python virtual env instructions This change adds instructions on how to setup a python virtual env for this repo. In addition, the respective requirements files have been added for easy installation with pip. --- .gitignore | 3 +++ README.md | 12 ++++++++++++ requirements-buildenv.txt | 1 + requirements.txt | 3 +++ 4 files changed, 19 insertions(+) create mode 100644 requirements-buildenv.txt create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index dea63f1..a2e9097 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ +generated_python/__pycache__/ qr/ +venv/ + diff --git a/README.md b/README.md index a53520a..434ad54 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,18 @@ For printing QR codes, the qrcode module is required pip install qrcode[pil] +### Alternative installation method + +Alternatively, you can use a python virtual env for the dependencies: + + python -m venv venv + . venv/bin/activate + pip install -r requirements-buildenv.txt + pip install -r requirements.txt + +The requirements\*.txt files contain all the dependencies (also the optional ones). +To leave the python virtual env just call `deactivate`. + ## Technical background The export QR code of "Google Authenticator" contains the URL `otpauth-migration://offline?data=...`. diff --git a/requirements-buildenv.txt b/requirements-buildenv.txt new file mode 100644 index 0000000..2309722 --- /dev/null +++ b/requirements-buildenv.txt @@ -0,0 +1 @@ +wheel diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5c316ae --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +protobuf +qrcode +Pillow