From 33e5adc0140505536447846d4b901fb360eaa350 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 16 Jun 2024 03:02:12 +0300 Subject: [PATCH] Build: Add `Makefile` to manage a virtual env --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f07aa0f --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +.SUFFIXES: # Clear the suffix list + +PYTHON=python3 +VENVDIR=../../../../.search-tags-venv + +.PHONY: all +all: + @echo Nothing to do for \`all\' + +.PHONY: clean-venv +clean-venv: + rm -rf $(VENVDIR) + +.PHONY: venv +venv: + @if [ -d $(VENVDIR) ] ; then \ + echo "venv already exists."; \ + echo "To recreate it, remove it first with \`make clean-venv'."; \ + else \ + sudo apt-get install -y python3-pip python3-wheel python3-virtualenv; \ + $(PYTHON) -m virtualenv $(VENVDIR); \ + $(VENVDIR)/bin/python -m pip install -U --compile pip wheel; \ + $(VENVDIR)/bin/python -m pip install -U --compile -r requirements.txt; \ + echo "The venv has been created in the $(VENVDIR) directory"; \ + fi + -- 2.39.2