Skip to content

Commit 0961600

Browse files
committed
Fix j2, double venv
1 parent 65907fc commit 0961600

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

Makefile

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ certificates/domain.key:
2626
# Done: Creating docker secrets
2727

2828
.PHONY: up-local
29-
up-local: .install-fqdn certificates/domain.crt certificates/domain.key .create-secrets ## deploy osparc ops stacks and simcore, use minio_disabled=1 if minio s3 should not be started (if you have custom S3 set up)
29+
up-local: .init .venv .install-fqdn certificates/domain.crt certificates/domain.key .create-secrets ## deploy osparc ops stacks and simcore, use minio_disabled=1 if minio s3 should not be started (if you have custom S3 set up)
3030
@bash scripts/deployments/deploy_everything_locally.bash --stack_target=local --minio_enabled=0 --vcs_check=1
3131
@$(MAKE) info-local
3232

@@ -71,15 +71,6 @@ down-maintenance: ## Stop the maintenance mode
7171
fi \
7272
,)
7373

74-
75-
.PHONY: venv
76-
venv: .venv ## Creates a python virtual environment with dev tools (pip, pylint, ...)
77-
.venv:
78-
@python3 -m venv .venv
79-
@.venv/bin/pip3 install --upgrade pip wheel setuptools
80-
@.venv/bin/pip3 install typer
81-
@echo "To activate the venv, execute 'source .venv/bin/activate'"
82-
8374
# Misc: info & clean
8475
.PHONY: info info-vars info-local
8576
info: ## Displays some important info

scripts/common.Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ VERSION := $(shell uname -a)
77

88
# Checks for handling various operating systems
99
ifeq ($(filter Windows_NT,$(OS)),)
10-
IS_WSL := $(if $(findstring microsoft,$(shell uname -a | tr '[:upper:]' '[:lower:]')),WSL,)
1110
IS_WSL2 := $(if $(findstring -microsoft-,$(shell uname -a)),WSL2,)
1211
IS_OSX := $(filter Darwin,$(shell uname -a))
1312
IS_LINUX:= $(if $(or $(IS_WSL),$(IS_OSX)),,$(filter Linux,$(shell uname -a)))
1413
endif
1514
IS_WIN := $(strip $(if $(or $(IS_LINUX),$(IS_OSX),$(IS_WSL)),,$(OS)))
1615

17-
$(if $(IS_WIN),$(error Windows is not supported in all recipes. Use WSL2 instead. Follow instructions in README.md),)
1816
$(if $(IS_WSL2),,$(if $(IS_WSL),$(error WSL1 is not supported in all recipes. Use WSL2 instead. Follow instructions in README.md),))
1917

2018
# Check that a valid location to a config file is set.
@@ -243,20 +241,21 @@ clean-default: .check_clean ## Cleans all outputs
243241
# creating virtual environment with tooling (jinja, etc)
244242
@python3 -m venv .venv
245243
@.venv/bin/pip3 install --upgrade pip wheel setuptools
246-
@.venv/bin/pip3 install jinja2 j2cli[yaml]
244+
@.venv/bin/pip3 install jinja2 j2cli[yaml] typer
245+
@echo "To activate the venv, execute 'source .venv/bin/activate'"
247246
248247
249248
# https://github.com/kolypto/j2cli?tab=readme-ov-file#customization
250249
ifeq ($(shell test -f j2cli_customization.py && echo -n yes),yes)
251250
252251
define jinja
253-
.venv/bin/j2 --format=env $(1) .env -o $(2) --customize j2cli_customization.py
252+
$(REPO_BASE_DIR)/.venv/bin/j2 --format=env $(1) .env -o $(2) --customize j2cli_customization.py
254253
endef
255254
256255
else
257256
258257
define jinja
259-
.venv/bin/j2 --format=env $(1) .env -o $(2)
258+
$(REPO_BASE_DIR)/.venv/bin/j2 --format=env $(1) .env -o $(2)
260259
endef
261260
262261
endif

0 commit comments

Comments
 (0)