Makefile 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. enginescfg:
  18. @test -f ./engines.cfg || echo "Copying engines.cfg ..."
  19. @cp --no-clobber engines.cfg_sample engines.cfg
  20. robot: .installed.cfg enginescfg
  21. @bin/robot
  22. flake8: .installed.cfg
  23. @bin/flake8 setup.py
  24. @bin/flake8 ./searx/
  25. coverage: .installed.cfg
  26. @bin/coverage run --source=./searx/ --branch bin/test
  27. @bin/coverage report --show-missing
  28. @bin/coverage html --directory ./coverage
  29. production: bin/buildout production.cfg setup.py enginescfg
  30. bin/buildout -c production.cfg $(options)
  31. @echo "* Please modify `readlink --canonicalize-missing ./searx/settings.py`"
  32. @echo "* Hint 1: on production, disable debug mode and change secret_key"
  33. @echo "* Hint 2: searx will be executed at server startup by crontab"
  34. @echo "* Hint 3: to run immediatley, execute 'bin/supervisord'"
  35. minimal: bin/buildout minimal.cfg setup.py enginescfg
  36. bin/buildout -c minimal.cfg $(options)
  37. clean:
  38. @rm -rf .installed.cfg .mr.developer.cfg bin parts develop-eggs \
  39. searx.egg-info lib include .coverage coverage
  40. .PHONY: all tests enginescfg robot flake8 coverage production minimal clean