summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2019-12-10 17:35:23 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2019-12-10 17:35:23 +0100
commit9988cdcbc514f799c5a2d2a111c82b8a123bbae3 (patch)
tree4f6701f3b443c617e5646b2a9dff3ab55c3084bc /Makefile
parent56b7e05721394c0490ff43960cb7fa5626e83e3d (diff)
parent50e1fcaa5e7369a64829552fc96cd24c787706c9 (diff)
Merge branch 'master' of https://github.com/asciimoo/searx into dos2unix
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000..77ffe489f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,62 @@
+# -*- coding: utf-8; mode: makefile-gmake -*-
+
+PYOBJECTS = searx
+PY_SETUP_EXTRAS ?= \[test\]
+
+include utils/makefile.include
+include utils/makefile.python
+
+all: clean install
+
+PHONY += help
+help:
+ @echo ' test - run developer tests'
+ @echo ' run - run developer instance'
+ @echo ' install - developer install (./local)'
+ @echo ' uninstall - uninstall (./local)'
+ @echo ''
+ @$(MAKE) -s -f utils/makefile.include make-help
+ @echo ''
+ @$(MAKE) -s -f utils/makefile.python python-help
+
+PHONY += install
+install: pyenvinstall
+
+PHONY += uninstall
+uninstall: pyenvuninstall
+
+PHONY += clean
+clean: pyclean
+ $(call cmd,common_clean)
+
+PHONY += run
+run: pyenvinstall
+ $(Q) ( \
+ sed -i -e "s/debug : False/debug : True/g" ./searx/settings.yml ; \
+ sleep 2 ; \
+ xdg-open http://127.0.0.1:8888/ ; \
+ sleep 3 ; \
+ sed -i -e "s/debug : True/debug : False/g" ./searx/settings.yml ; \
+ ) &
+ $(PY_ENV)/bin/python ./searx/webapp.py
+
+# test
+# ----
+
+PHONY += test test.pylint test.pep8 test.unit test.robot
+
+# TODO: balance linting with pylint
+test: test.pep8 test.unit test.robot
+ - make pylint
+
+test.pep8: pyenvinstall
+ $(PY_ENV_ACT); ./manage.sh pep8_check
+
+test.unit: pyenvinstall
+ $(PY_ENV_ACT); ./manage.sh unit_tests
+
+test.robot: pyenvinstall
+ $(PY_ENV_ACT); ./manage.sh install_geckodriver
+ $(PY_ENV_ACT); ./manage.sh robot_tests
+
+.PHONY: $(PHONY)