Skip to content

Commit

Permalink
Install python dependencies only once
Browse files Browse the repository at this point in the history
This commit changes 'python-deps' target to create stub file in the 'venv/'
directory, so that dependencies are installed only once.

Signed-off-by: Maciej Dudek <[email protected]>
  • Loading branch information
mtdudek committed Dec 5, 2024
1 parent 35bfd92 commit a6c4cc6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ all:
build:
python rowhammer_tester/targets/$(TARGET).py --build $(TARGET_ARGS)

lint: python-deps
lint: venv/python-deps
ruff format

lint-check: python-deps ## Run RTL lint and check lint on tests source code without fixing errors
lint-check: venv/python-deps ## Run RTL lint and check lint on tests source code without fixing errors
ruff check

sim: sim-deps
Expand Down Expand Up @@ -135,7 +135,7 @@ minimal-deps:: # Intentionally skipping --recursive as not needed (but doesn't b
git submodule update --init
(make --no-print-directory -C . \
venv/bin/openFPGALoader \
python-deps \
venv/python-deps \
)

deps: minimal-deps sim-deps
Expand All @@ -146,8 +146,9 @@ deps: minimal-deps sim-deps

sim-deps: venv/bin/verilator

python-deps: venv/bin/activate # installs python dependencies inside virtual environment
venv/python-deps: venv/bin/activate # installs python dependencies inside virtual environment
pip install -r requirements.txt
touch venv/python-deps

venv/bin/activate: # creates virtual environment if it does not exist
python3 -m venv venv
Expand Down

0 comments on commit a6c4cc6

Please sign in to comment.