Skip to content

Commit 0db847f

Browse files
committed
Implement venv-activate
1 parent 8a8696b commit 0db847f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

GNUmakefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,10 @@ $(LOCAL)/$(VENV_NAME):
542542
&& cd $@ && git clone $(GHUB_REPO) $(GHUB_BRCH) \
543543
&& . ./bin/activate && make -C $(GHUB_NAME) install-dev install
544544

545-
# Activate a given VirtualEnv
545+
# Activate a given VirtualEnv, and go to its python-slip39 installation
546+
# o Creates a custom venv-activate.sh script in the venv, and uses it start
547+
# start a sub-shell in that venv, with a CWD in the contained python-slip39 installation
546548
$(LOCAL)/$(VENV_NAME)-activate: $(LOCAL)/$(VENV_NAME)
547549
@echo; echo "*** Activating $@ VirtualEnv"
548-
. $</bin/activate
550+
[ -s $</start ] || echo ". $</bin/activate; cd $</$(GHUB_NAME)" > $</venv-activate.sh
551+
bash --init-file $</venv-activate.sh -i

0 commit comments

Comments
 (0)