diff options
author | Andreas HABEGGER <andreas.habegger@bfh.ch> | 2023-11-16 17:21:37 +0100 |
---|---|---|
committer | Andreas HABEGGER <andreas.habegger@bfh.ch> | 2023-11-20 12:01:50 +0100 |
commit | 43bebab76a68e29f864e3786d0195984d50a21f5 (patch) | |
tree | b38632fb3df191941ec8c9e5cc07d6e26373a9c8 | |
parent | 94e54c42c69d1a4a1bdb42a6a508c9efc0d10da1 (diff) | |
download | www-dev/andreas-habegger/python-venv.tar.gz www-dev/andreas-habegger/python-venv.tar.bz2 www-dev/andreas-habegger/python-venv.zip |
Added a description of how to use Python venvdev/andreas-habegger/python-venv
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | README | 21 | ||||
-rw-r--r-- | requirements.txt | 3 |
3 files changed, 25 insertions, 1 deletions
@@ -1,3 +1,5 @@ +# Exclude Python virtual environment -- see README +.venv *.mo locale/messages.pot @@ -82,7 +82,26 @@ Install python3.7, py37-babel, npm, nodejs from pkgsrc. Adjust the values in config.mk: PYTHON=python3.7 BABEL=pybabel-3.7 - +==================== +Python virtual env +==================== +* Install python3 i.e on Debian +``` +# apt install python3 +``` +* Create virtual environment **.venv directory is excluded with git ignore paterns** +``` +python3 -m venv .venv +``` +* Activate the virtual environment +``` +source .venv/bin/activate +``` +* Install all requirements from [requirements.txt](requirements.txt) using pip +``` +pip install -r requirements.txt + + B. When reusing the existing web site from Git, get its files and folder structure: # git clone git+ssh://git@git.taler.net/www.git diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..9ac6979f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +ruamel.yaml +jinja2 +babel |