123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # convenience makefile to boostrap & run buildout
  2. # use `make options=-v` to run buildout with extra options
  3. version = 2.7
  4. python = bin/python
  5. options =
  6. all: .installed.cfg
  7. .installed.cfg: bin/buildout buildout.cfg setup.py
  8. bin/buildout $(options)
  9. bin/buildout: $(python) buildout.cfg bootstrap.py
  10. $(python) bootstrap.py
  11. @touch $@
  12. $(python):
  13. virtualenv -p python$(version) --no-site-packages .
  14. @touch $@
  15. robot: .installed.cfg
  16. @bin/robot
  17. flake8: .installed.cfg
  18. @bin/flake8 setup.py
  19. @bin/flake8 ./searx/
  20. tests: .installed.cfg flake8
  21. @bin/test
  22. @grunt test --gruntfile searx/static/themes/oscar/gruntfile.js
  23. coverage: .installed.cfg
  24. @bin/coverage run bin/test
  25. @bin/coverage report
  26. @bin/coverage html
  27. production: bin/buildout production.cfg setup.py
  28. bin/buildout -c production.cfg $(options)
  29. @echo "* Please modify `readlink --canonicalize-missing ./searx/settings.py`"
  30. @echo "* Hint 1: on production, disable debug mode and change secret_key"
  31. @echo "* Hint 2: searx will be executed at server startup by crontab"
  32. @echo "* Hint 3: to run immediatley, execute 'bin/supervisord'"
  33. minimal: bin/buildout minimal.cfg setup.py
  34. bin/buildout -c minimal.cfg $(options)
  35. styles:
  36. @lessc -x searx/static/themes/default/less/style.less > searx/static/themes/default/css/style.css
  37. @lessc -x searx/static/themes/default/less/style-rtl.less > searx/static/themes/default/css/style-rtl.css
  38. @lessc -x searx/static/themes/courgette/less/style.less > searx/static/themes/courgette/css/style.css
  39. @lessc -x searx/static/themes/courgette/less/style-rtl.less > searx/static/themes/courgette/css/style-rtl.css
  40. @lessc -x searx/static/less/bootstrap/bootstrap.less > searx/static/css/bootstrap.min.css
  41. @lessc -x searx/static/themes/oscar/less/oscar/oscar.less > searx/static/themes/oscar/css/oscar.min.css
  42. @lessc -x searx/static/themes/pix-art/less/style.less > searx/static/themes/pix-art/css/style.css
  43. grunt:
  44. @grunt --gruntfile searx/static/themes/oscar/gruntfile.js
  45. locales:
  46. @pybabel compile -d searx/translations
  47. clean:
  48. @rm -rf .installed.cfg .mr.developer.cfg bin parts develop-eggs \
  49. searx.egg-info lib include .coverage coverage searx/static/themes/default/css/*.css
  50. .PHONY: all tests robot flake8 coverage production minimal styles locales clean