Issue
I want to perform several operations while working on a specified virtualenv.
For example command
make install
source path/to/virtualenv/bin/activate
pip install -r requirements.txt
Is it possible?
Solution
In make you can run a shell as command. In this shell you can do everything you can do in a shell you started from comandline. Example:
install:
( \
source path/to/virtualenv/bin/activate; \
pip install -r requirements.txt; \
)
Attention must be paid to the ;
and the \
.
Everything between the open and close brace will be done in a single instance of a shell.
Answered By - Klaus Answer Checked By - Candace Johnson (WPSolving Volunteer)