From 6b1c713b42840aad360188a42180c371b97bff88 Mon Sep 17 00:00:00 2001 From: Conor Schaefer Date: Thu, 23 Sep 2021 14:44:50 -0700 Subject: [PATCH] Source venv to install packages in it Encountered while setting up the "venv-debian", looks like we need it on the other setup as well. Works well for me locally. --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d4127b2f49..87dc01e209 100644 --- a/Makefile +++ b/Makefile @@ -4,14 +4,19 @@ all: help .PHONY: venv-debian venv-debian: ## Provision a Python 3 virtualenv for development on a prod-like system that has installed dependencies specified in https://github.com/freedomofpress/securedrop-debian-packaging/blob/main/securedrop-client/debian/control python3 -m venv .venv-debian --system-site-packages - .venv-debian/bin/pip install --upgrade pip wheel - .venv-debian/bin/pip install --require-hashes -r "requirements/dev-requirements-debian.txt" + . .venv-debian/bin/activate && .venv-debian/bin/pip install --upgrade pip wheel + . .venv-debian/bin/activate && .venv-debian/bin/pip install --require-hashes -r "requirements/dev-requirements-debian.txt" + @echo "#################" + @echo "Virtualenv with Debian system-packages is complete." + @echo "Make sure to install the apt packages for system Qt." + @echo "Then run: source .venv-debian/bin/activate" + .PHONY: venv venv: ## Provision a Python 3 virtualenv for development python3 -m venv .venv - .venv/bin/pip install --upgrade pip wheel - .venv/bin/pip install --require-hashes -r "requirements/dev-requirements.txt" + . .venv/bin/activate && .venv/bin/pip install --upgrade pip wheel + . .venv/bin/activate && .venv/bin/pip install --require-hashes -r "requirements/dev-requirements.txt" SEMGREP_FLAGS := --exclude "tests/" --error --strict --verbose