Add script and configure environment to install python dependencies into a project subfolder

This commit is contained in:
W13R 2022-03-16 18:58:27 +01:00
parent c6315a01f0
commit fb50140762
6 changed files with 12 additions and 3 deletions

1
.gitignore vendored
View file

@ -3,6 +3,7 @@
/application/**/migrations/* /application/**/migrations/*
/archive/* /archive/*
/logs/* /logs/*
/packages/*
/temp /temp
/tmp /tmp
__pycache__ __pycache__

View file

@ -20,9 +20,9 @@ Before the actual setup, you have to satisfy the following dependencies:
All required python packages are listed `in pip-dependencies.txt` All required python packages are listed `in pip-dependencies.txt`
You can install the required python packages with the following command: You can install the required python packages with
```bash ```bash
pip install -U -r pip-dependencies.txt ./install-pip-dependencies.sh
``` ```
## II.A Installation ## II.A Installation

7
install-pip-dependencies.sh Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# install the required python packages
wd=$(dirname $0)
pip3 install -r "$wd/pip-dependencies.txt" -t "$wd/packages"

View file

@ -75,7 +75,7 @@ try:
) )
app_process = Popen( app_process = Popen(
[ [
"uvicorn", "python3", "-m", "uvicorn",
"--host", "localhost", "--host", "localhost",
"--port", quote(DJANGO_PORT), "--port", quote(DJANGO_PORT),
"drinks_manager.asgi:application" "drinks_manager.asgi:application"

View file

@ -3,3 +3,4 @@
export DJANGO_SK_ABS_FP="$(pwd)/config/secret_key.txt" export DJANGO_SK_ABS_FP="$(pwd)/config/secret_key.txt"
export STATIC_FILES="$(pwd)/static/" export STATIC_FILES="$(pwd)/static/"
export APP_VERSION="2.6" export APP_VERSION="2.6"
export PYTHONPATH="$(pwd)/packages/"

0
packages/.gitkeep Normal file
View file