Makefile 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. tests: .installed.cfg
  16. @bin/test
  17. robot: .installed.cfg
  18. @bin/robot
  19. flake8: .installed.cfg
  20. @bin/flake8 setup.py
  21. @bin/flake8 ./searx/
  22. coverage: .installed.cfg
  23. @bin/coverage run bin/test
  24. @bin/coverage report
  25. @bin/coverage html
  26. production: bin/buildout production.cfg setup.py
  27. bin/buildout -c production.cfg $(options)
  28. @echo "* Please modify `readlink --canonicalize-missing ./searx/settings.py`"
  29. @echo "* Hint 1: on production, disable debug mode and change secret_key"
  30. @echo "* Hint 2: searx will be executed at server startup by crontab"
  31. @echo "* Hint 3: to run immediatley, execute 'bin/supervisord'"
  32. minimal: bin/buildout minimal.cfg setup.py
  33. bin/buildout -c minimal.cfg $(options)
  34. styles:
  35. @lessc -x searx/static/default/less/style.less > searx/static/default/css/style.css
  36. locales:
  37. @pybabel compile -d searx/translations
  38. clean:
  39. @rm -rf .installed.cfg .mr.developer.cfg bin parts develop-eggs \
  40. searx.egg-info lib include .coverage coverage searx/static/default/css/*.css
  41. .PHONY: all tests robot flake8 coverage production minimal styles locales clean