]> git.phdru.name Git - phdru.name/cgi-bin/blog-ru/search-tags.git/blobdiff - Makefile
Feat: Search tags ignoring case
[phdru.name/cgi-bin/blog-ru/search-tags.git] / Makefile
index d802c5af8ab2434dd0271babb8d87691628adb8f..f07aa0fd5e4ba0604644ad17859e2db1ecd54c31 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,26 @@
-# Makefile.
-#
-# __author__ = "Oleg Broytman <phd@phdru.name>"
-# __copyright__ = "Copyright (C) 2014 PhiloSoft Design"
+.SUFFIXES: # Clear the suffix list
 
-%.py: %.tmpl
-       cheetah compile --nobackup $< && compyle $@
+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
 
-search_tags.py: search_tags.tmpl