diff --git a/.gitignore b/.gitignore index b1c2a32..8db7fca 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /application/**/migrations/* /archive/* /logs/* +/packages/* /temp /tmp __pycache__ diff --git a/docs/Setup.md b/docs/Setup.md index 2d3907d..4ddab18 100644 --- a/docs/Setup.md +++ b/docs/Setup.md @@ -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` -You can install the required python packages with the following command: +You can install the required python packages with ```bash -pip install -U -r pip-dependencies.txt +./install-pip-dependencies.sh ``` ## II.A Installation diff --git a/install-pip-dependencies.sh b/install-pip-dependencies.sh new file mode 100755 index 0000000..8dfc0d2 --- /dev/null +++ b/install-pip-dependencies.sh @@ -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" diff --git a/lib/bootstrap.py b/lib/bootstrap.py index 7fc3286..84944b1 100644 --- a/lib/bootstrap.py +++ b/lib/bootstrap.py @@ -75,7 +75,7 @@ try: ) app_process = Popen( [ - "uvicorn", + "python3", "-m", "uvicorn", "--host", "localhost", "--port", quote(DJANGO_PORT), "drinks_manager.asgi:application" diff --git a/lib/env.sh b/lib/env.sh index 07a2b66..51181e9 100644 --- a/lib/env.sh +++ b/lib/env.sh @@ -3,3 +3,4 @@ export DJANGO_SK_ABS_FP="$(pwd)/config/secret_key.txt" export STATIC_FILES="$(pwd)/static/" export APP_VERSION="2.6" +export PYTHONPATH="$(pwd)/packages/" diff --git a/packages/.gitkeep b/packages/.gitkeep new file mode 100644 index 0000000..e69de29