Skip to content

Commit

Permalink
scripts: split Python requirements
Browse files Browse the repository at this point in the history
* Split Python setup and App requirements
* Move global Python requirements installation from Python setup to bootstrap. (allows for docs only setup)
  • Loading branch information
silopolis committed Dec 28, 2023
1 parent 44a5ae9 commit 590cefe
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
5 changes: 5 additions & 0 deletions requirements.app.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
asyncpg==0.27.0
fastapi==0.89.1
ormar==0.12.1
psycopg2-binary==2.9.5
uvicorn==0.20.0
11 changes: 5 additions & 6 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
asyncpg==0.27.0
fastapi==0.89.1
ormar==0.12.1
psycopg2-binary==2.9.5
uvicorn==0.20.0
pip-tools==7.3.0
# Compile project requirement with (pip-tools needed):
# pip-compile --output-file=requirements.txt requirements.in

-r requirements.python.in
-r requirements.app.in
-r docs/requirements.in
1 change: 1 addition & 0 deletions requirements.python.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pip-tools==7.3.0
3 changes: 3 additions & 0 deletions scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ echo "-- Activate Python virtual environment"
# shellcheck source="../.venv/bin/activate"
source .venv/bin/activate

echo "-- Install project Python requirements in venv"
pip install -r requirements.txt

if [ -f .env ]; then
echo "-- Source '.env' configuration file"
# shellcheck source="../.env" disable=SC1091
Expand Down
5 changes: 3 additions & 2 deletions scripts/python_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ source .venv/bin/activate

echo "-- Upgrage Python pip and setuptools in venv"
pip install --upgrade setuptools pip
echo "-- Install Python requirements in venv"
pip install -r requirements.txt

echo "-- Install Python setup requirements in venv"
pip install -r requirements.python.in

## and go back
cd "$cwd"

0 comments on commit 590cefe

Please sign in to comment.