frostfs-testcases/venv_template.mk
anastasia prasolova 5485238ca5 [][]: added neofs-keywords as a module
Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
2022-02-17 14:34:47 +03:00

17 lines
704 B
Makefile

define VENV_template
venv.$(1): venv.$(1)/bin/activate venv.$(1)/bin/environment.sh
venv.$(1)/bin/activate: venv/$(1)/requirements.txt submodules
@echo "Creating $(1) venv in $$@ from $$<"
virtualenv --python=python3.8 --prompt="($(1))" venv.$(1)
source venv.$(1)/bin/activate && \
pip3.8 install -Ur venv/$(1)/requirements.txt && \
pip3.8 install -Ur neofs-keywords/requirements.txt
@echo "Applying activate script patch"
patch -R --dry-run -p1 -s -f -d venv.$(1)/bin/ < build_assets/activate.patch || \
patch -p1 -d venv.$(1)/bin/ < build_assets/activate.patch
venv.$(1)/bin/environment.sh: | venv/$(1)/environment.sh
ln -s ../../venv/$(1)/environment.sh venv.$(1)/bin/environment.sh
endef