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 2779d29
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 14 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
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
anyio==4.0.0
# via starlette
asyncpg==0.27.0
# via -r requirements.in
# via -r requirements.app.in
babel==2.13.1
# via
# mkdocs-git-revision-date-localized-plugin
Expand Down Expand Up @@ -40,7 +40,7 @@ databases==0.6.2
defusedxml==0.7.1
# via cairosvg
fastapi==0.89.1
# via -r requirements.in
# via -r requirements.app.in
ghp-import==2.1.0
# via mkdocs
gitdb==4.0.11
Expand Down Expand Up @@ -112,7 +112,7 @@ mkdocs-section-index==0.3.8
natsort==8.4.0
# via mkdocs-awesome-pages-plugin
ormar==0.12.1
# via -r requirements.in
# via -r requirements.app.in
packaging==23.2
# via
# build
Expand All @@ -126,11 +126,11 @@ pillow==9.5.0
# cairosvg
# mkdocs-material
pip-tools==7.3.0
# via -r requirements.in
# via -r requirements.python.in
platformdirs==4.0.0
# via mkdocs
psycopg2-binary==2.9.5
# via -r requirements.in
# via -r requirements.app.in
pycparser==2.21
# via cffi
pydantic==1.10.4
Expand Down Expand Up @@ -193,7 +193,7 @@ typing-extensions==4.8.0
urllib3==2.1.0
# via requests
uvicorn==0.20.0
# via -r requirements.in
# via -r requirements.app.in
verspec==0.1.0
# via mike
watchdog==3.0.0
Expand Down
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 2779d29

Please sign in to comment.