Makefile 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. @grunt test --gruntfile searx/static/oscar/gruntfile.js
  18. robot: .installed.cfg
  19. @bin/robot
  20. flake8: .installed.cfg
  21. @bin/flake8 setup.py
  22. @bin/flake8 ./searx/
  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/default/less/style.less > searx/static/default/css/style.css
  37. @lessc -x searx/static/oscar/less/bootstrap/bootstrap.less > searx/static/oscar/css/bootstrap.min.css
  38. @lessc -x searx/static/oscar/less/oscar/oscar.less > searx/static/oscar/css/oscar.min.css
  39. grunt:
  40. @grunt --gruntfile searx/static/oscar/gruntfile.js
  41. locales:
  42. @pybabel compile -d searx/translations
  43. clean:
  44. @rm -rf .installed.cfg .mr.developer.cfg bin parts develop-eggs \
  45. searx.egg-info lib include .coverage coverage searx/static/default/css/*.css
  46. .PHONY: all tests robot flake8 coverage production minimal styles locales clean